Documentation ¶
Overview ¶
Logger is a simple wrapper for logrus.Logger which extends it's capabilities by providing Logger's per category. This is useful when an application is broken up into different components and different levels set per category
Index ¶
Constants ¶
View Source
const ( DefaultCategory = "_" DefaultTimeFormat = "2006-01-02T15:04:05.000" )
Variables ¶
This section is empty.
Functions ¶
func SetLevel ¶
SetLevel enforces the specified level on the specified category. If a logger for the category hasn't been defined then this is a no-op. In some cases you may want to globally initialize all logging modules ahead of time, in this scenario you can call GetLogger and set the returned pointers Level
func SetLogConfigurationHook ¶
func SetLogConfigurationHook(hook LogConfigurationHook)
Types ¶
type Log ¶
type Log struct { // inherit from logrus logger logrus.Logger // contains filtered or unexported fields }
Logger is a wrapper for a logrus.Logger which adds a category
type LogConfigurationHook ¶
type LogConfigurationHook interface { // ConfigureLogger is a hook which allows custom setup and overrides for the default // category based logger. This allows the implementation to override formatting, output // and level hooks. ConfigureLogger(logger *Log) }
Click to show internal directories.
Click to hide internal directories.