Documentation ¶
Overview ¶
Package logger exposes a simple logging interface for the application. The package is responsible for writing all application logs, which, by default, are written at to `stderr` for events at warn level or above.
The behavior of the logger can be modified using the `logger.Log()` function to write all logs at debug level or above to `stderr`, and a text file named `logs.txt`
To safely close the logger, use `logger.Stop()`
Index ¶
- func Debug(args ...interface{})
- func Debugf(message string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Log(writeToFile bool) (err error)
- func Stop() error
- func Warn(args ...interface{})
- func Warnf(msg string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(message string, args ...interface{})
Debugf uses `fmt.Sprintf` style formatting to log messages at the `debug` level
func Errorf ¶
func Errorf(template string, args ...interface{})
Errorf uses `fmt.Sprintf` style formatting to log messages at the `error` level
func Infof ¶
func Infof(template string, args ...interface{})
Infof uses `fmt.Sprintf` style formatting to log messages at the `info` level
Types ¶
This section is empty.