请各位推荐一下常用的log包,谢谢!

在golang awesome上看到有这些: glg - glg is simple and fast leveled logging library for Go. glog - Leveled execution logs for Go. go-log - Log lib supports level and multi handlers. go-log - A log4j implementation in Go. go-logger - Simple logger of Go Programs, with level handlers. gologger - Simple easy to use log lib for go, logs in Colored Cosole, Simple Console, File or Elasticsearch. gomol - Multiple-output, structured logging for Go with extensible logging outputs. gone/log - Fast, extendable, full-featured, std-lib source compatible log library. log - Structured logging package for Go. log - Simple, configurable and scalable Structured Logging for Go. log-voyage - Full-featured logging saas written in golang. log15 - Simple, powerful logging for Go logdump - Package for multi-level logging logex - An golang log lib, supports tracking and level, wrap by standard log lib logger - Minimalistic logging library for Go. logrus - a structured logger for Go. logrusly - logrus plug-in to send errors to a Loggly. logutils - Utilities for slightly better logging in Go (Golang) extending the standard logger. logxi - A 12-factor app logger that is fast and makes you happy. lumberjack - Simple rolling logger, implements io.WriteCloser. mlog - A simple logging module for go, with 5 levels, an optional rotating logfile feature and stdout/stderr output. ozzo-log - High performance logging supporting log severity, categorization, and filtering. Can send filtered log messages to various targets (e.g. console, network, mail). seelog - logging functionality with flexible dispatching, filtering, and formatting. slf - The Structured Logging Facade (SLF) for Go (like SLF4J but structured and for Go) slog - The reference implementation of the Structured Logging Facade (SLF) for Go spew - Implements a deep pretty printer for Go data structures to aid in debugging stdlog - Stdlog is an object-oriented library providing leveled logging. It is very useful for cron jobs. tail - A Go package striving to emulate the features of the BSD tail program. xlog - Plugin architecture and flexible log system for Go, with level ctrl, multiple log target and custom log format. xlog - A structured logger for net/context aware HTTP handlers with flexible dispatching. zap - Fast, structured, leveled logging in Go. zerolog - Zero-allocation JSON logger.

不知大家用的比较好的是哪些呢?

已邀请:

stirlingx - https://github.com/liyue201

赞同来自:

太多了,眼花缭乱

caoqianli - Programing

赞同来自:

比较流行的有logrus和seelog。用着都有点不习惯,现在自己轮了一个来用: https://github.com/clearthesky/vlog

jinleileiking

赞同来自:

zap

cye

赞同来自:

根据一个第三方库改造的轮子

qiangmzsx - 痛而不言,笑而不语,迷而不失,惊而不乱。

赞同来自:

我使用beegolog和logrus

yangbt - https://github.com/ybtq 在健身房写代码的程序猿

赞同来自:

我试用过近10个日志模块,都不尽如人意(比如有的日志模块,在Linux Mac上显示完美,在Windows上日志显示一团糟,我有强迫症,必须弃用)。beego的logs模块,是我用过最好用的。如果你只是为了用logs模块,完全可以将beego的logs模块拿出来,记得要调用logs.SetLogFuncCallDepth(3)。默认值是4

要回复问题请先登录注册