Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(template string, kv ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errorw(template string, kv ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatalw(template string, kv ...interface{})
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Infow(template string, kv ...interface{})
- func Init(cfg Config)
- func NewLogger(cfg Config) (*zap.SugaredLogger, *zap.AtomicLevel, error)
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(template string, kv ...interface{})
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorf ¶
func Errorf(template string, args ...interface{})
Errorf calls log.Errorf and stores the error message into the ErrorFile
func Init ¶
func Init(cfg Config)
Init the logger with defined level. outputs defines the outputs where the logs will be sent. By default outputs contains "stdout", which prints the logs at the output of the process. To add a log file as output, the path should be added at the outputs array. To avoid printing the logs but storing them on a file, can use []string{"pathtofile.log"}
func NewLogger ¶
func NewLogger(cfg Config) (*zap.SugaredLogger, *zap.AtomicLevel, error)
NewLogger creates the logger with defined level. outputs defines the outputs where the logs will be sent. By default, outputs contains "stdout", which prints the logs at the output of the process. To add a log file as output, the path should be added at the outputs array. To avoid printing the logs but storing them on a file, can use []string{"pathtofile.log"}