Description

UseLogger sets the 'Current' package level logger variable to the specified value. This variable is used in all Trace/Debug/... package level convenience funcs.

Example:

after calling

seelog.UseLogger(somelogger)

the following:

seelog.Debug("abc")

will be equal to

somelogger.Debug("abc")

IMPORTANT: UseLogger do NOT close the previous logger (only flushes it). So if you constantly use it to replace loggers and don't close them in other code, you'll end up having memory leaks.

To safely replace loggers, use ReplaceLogger.

UseLogger is referenced in 4 repositories

github.com/cihub/seelog-examples github.com/mattheath/kraken github.com/opsgenie/opsgenie-go-sdk

...