func CloseFileOutput(next func(error))
CloseFileOutput [INTERNAL USE ONLY] Closes the file descriptor of log data if used
func FmtBlue(msg string) string
FmtBlue Colorize the given string
func FmtDBlue(msg string) string
FmtDBlue Colorize the given string
func FmtGreen(msg string) string
FmtGreen Colorize the given string
func FmtGrey(msg string) string
FmtGrey Colorize the given string
func FmtLBlue(msg string) string
FmtLBlue Colorize the given string
func FmtPurple(msg string) string
FmtPurple Colorize the given string
func FmtRed(msg string) string
FmtRed Colorize the given string
func FmtRedBg(msg string) string
FmtRedBg Colorize the given string
func FmtYellow(msg string) string
FmtYellow Colorize the given string
func Level(_level int)
Level Sets logging level
func SetCustomOutput(custom func(string, string, string, []interface{}) string)
SetCustomOutput Registers a custom function to create a log output string
func SetPrefix(prefix string)
SetPrefix Sets a prefix for every log
func Setup(confpath string)
Setup Load a configuration file into memory - pass an empty string to load nothing
func UpdateConfigs(configs map[string]interface{})
UpdateConfigs Apply configurations It can be executed in runtime to update the configurations also
func UseCustomOutput()
UseCustomOutput Enables custom output You must first set a custom log output function using SetCustomOutput()
func UseStackdriverLogging()
UseStackdriverLogging converts the logging format to stackdriver log entry format
Logger Logger data structure
type Logger struct { Name string // contains filtered or unexported fields }
func New(name string) *Logger
New Creates a new logger
func (logger *Logger) Debug(vals ...interface{})
Debug Outputs a log to stdout stream
func (logger *Logger) DisableCustom()
DisableCustom blocks logger.Write()
func (logger *Logger) EnableCustom()
EnableCustom allows logger.Write()
func (logger *Logger) Error(vals ...interface{})
Error Outputs a log to stdout stream
func (logger *Logger) Fatal(vals ...interface{})
Fatal Outputs a log to stdout stream
func (logger *Logger) FmtDebug(vals ...interface{}) string
FmtDebug Formats given strings and returns it for logging purpose
func (logger *Logger) FmtError(vals ...interface{}) string
FmtError Formats given strings and returns it for logging purpose
func (logger *Logger) FmtFatal(vals ...interface{}) string
FmtFatal Formats given strings and returns it for logging purpose
func (logger *Logger) FmtInfo(vals ...interface{}) string
FmtInfo Formats given strings and returns it for logging purpose
func (logger *Logger) FmtNotice(vals ...interface{}) string
FmtNotice Formats given strings and returns it for logging purpose
func (logger *Logger) FmtSys(vals ...interface{}) string
FmtSys Formats given strings and returns it for logging purpose
func (logger *Logger) FmtVerbose(vals ...interface{}) string
FmtVerbose Formats given strings and returns it for logging purpose
func (logger *Logger) FmtWarn(vals ...interface{}) string
FmtWarn Formats given strings and returns it for logging purpose
func (logger *Logger) Info(vals ...interface{})
Info Outputs a log to stdout stream
func (logger *Logger) Notice(vals ...interface{})
Notice Outputs a log to stdout stream
func (logger *Logger) Sys(vals ...interface{})
Sys Outputs a log to stdout stream
func (logger *Logger) Trace(vals ...interface{})
Trace Outputs a log to stdout stream as Sys level log with stack trace. Useful for debugging
func (logger *Logger) Verbose(vals ...interface{})
Verbose Outputs a log to stdout stream
func (logger *Logger) Warn(vals ...interface{})
Warn Outputs a log to stdout stream
func (logger *Logger) Write(vals ...interface{})
Write outputs a log to stdout stream