A high-performant Logging Foundation for Go Applications. X3 faster than the rest leveled loggers.
Full Changelog: https://github.com/kataras/golog/compare/v0.1.11...v0.1.12
Full Changelog: https://github.com/kataras/golog/compare/v0.1.8...v0.1.11
Full Changelog: https://github.com/kataras/golog/compare/v0.1.8...v0.1.9
Full Changelog: https://github.com/kataras/golog/compare/v0.1.7...v0.1.8
Minor version
Introduce the Formatter interface. Example.
Logger.RegisterFormatter(Formatter)
to register a custom Formatter
.Logger.SetFormat(formatter string, opts ...interface{})
to set the default formatter for all log levels.Logger.SetLevelFormat(levelName string, formatter string, opts ...interface{})
to change the output format for the given "levelName".golog.JSON
handler, introduced 12 hours ago, as it's now useless.Logger.SetLevelOutput(levelName string, w io.Writer)
to customize the writer per level. (v0.1.3)Logger.GetLevelOutput(levelName string) io.Writer
to get the leveled output or the default one.JSON(indent string) Handler
as a helper for JSON format: Logger.Handle(golog.JSON(" "))
.Add SetLevelOutput(level string, w io.Writer)
to customize writer per level.
Logger.Child
accepts an interface{}
instead of string
. This way you can register children for pointers without forcing to naming them. If the key is string or completes the fmt.Stringer
interface, then it's used as prefix (like always did).