Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func InitLogger(config *nconf.Config)
- func IsLevelEnabled(level Level) bool
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func SetLevel(level Level)
- func Sync() error
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- type Fields
- type Level
- type NLogger
Constants ¶
View Source
const ( // DebugLevel level. DebugLevel = Level(zapcore.DebugLevel) // InfoLevel level. InfoLevel = Level(zapcore.InfoLevel) // WarnLevel level. WarnLevel = Level(zapcore.WarnLevel) // ErrorLevel level. ErrorLevel = Level(zapcore.ErrorLevel) // PanicLevel level. PanicLevel Level = Level(zapcore.PanicLevel) // FatalLevel level. FatalLevel = Level(zapcore.FatalLevel) )
Variables ¶
This section is empty.
Functions ¶
func SetLevel ¶
func SetLevel(level Level)
SetLevel - alters the logging level. It lets you safely change the log level of a tree of loggers (the root logger and any children created by adding context) at runtime.
Types ¶
type NLogger ¶
type NLogger interface { IsLevelEnabled(level Level) bool LevelString() string WithError(err error) NLogger WithField(key string, value interface{}) NLogger WithFields(fields Fields) NLogger Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Panicf(format string, args ...interface{}) Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) Fatal(args ...interface{}) Panic(args ...interface{}) }
NLogger -
Click to show internal directories.
Click to hide internal directories.