Documentation ¶
Overview ¶
dateformat @author LanguageY++2013 2023/5/10 11:00 @company soulgame
logger @author LanguageY++2013 2023/5/6 14:34 @company soulgame
logger @author LanguageY++2013 2023/5/8 16:41 @company soulgame
Index ¶
- func DPanic(args ...interface{})
- func DPanicf(fmt string, args ...interface{})
- func DPanicw(msg string, keysAndValues ...interface{})
- func Debug(args ...interface{})
- func Debugf(fmt string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(args ...interface{})
- func Errorf(fmt string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(args ...interface{})
- func FatalIfError(err error)
- func Fatalf(format string, args ...interface{})
- func FatalfIf(cond bool, fmt string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func Info(args ...interface{})
- func Infof(fmt string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func LoadConfig(cfg LoggerConfig)
- func NewZapLogger(cfg LoggerConfig) (*zap.Logger, error)
- func Panic(args ...interface{})
- func Panicf(fmt string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func RegisterDateformatSink()
- func RegisterSinkLumberjackSink()
- func Warn(args ...interface{})
- func Warnf(fmt string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type Logger
- type LoggerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DPanic ¶
func DPanic(args ...interface{})
DPanic uses fmt.Sprint to construct and log a message. In development, the logger then panics. (See DPanicLevel for details.)
func DPanicf ¶
func DPanicf(fmt string, args ...interface{})
DPanicf uses fmt.Sprintf to log a templated message. In development, the logger then panics. (See DPanicLevel for details.)
func DPanicw ¶
func DPanicw(msg string, keysAndValues ...interface{})
DPanicw logs a message with some additional context. In development, the logger then panics. (See DPanicLevel for details.) The variadic key-value pairs are treated as they are in With.
func Fatal ¶
func Fatal(args ...interface{})
Fatal uses fmt.Sprint to construct and log a message, then panics.
func FatalIfError ¶
func FatalIfError(err error)
FatalIfError if err is not nil, then log to level fatal and call os.Exit
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf uses fmt.Sprintf to log a templated message, then panics.
func Fatalw ¶
func Fatalw(msg string, keysAndValues ...interface{})
Fatalw logs a message with some additional context, then panics. The variadic key-value pairs are treated as they are in With.
func NewZapLogger ¶
func NewZapLogger(cfg LoggerConfig) (*zap.Logger, error)
func Panic ¶
func Panic(args ...interface{})
Panic uses fmt.Sprint to construct and log a message, then panics.
func Panicf ¶
func Panicf(fmt string, args ...interface{})
Panicf uses fmt.Sprintf to log a templated message, then panics.
func Panicw ¶
func Panicw(msg string, keysAndValues ...interface{})
Panicw logs a message with some additional context, then panics. The variadic key-value pairs are treated as they are in With.
func RegisterDateformatSink ¶
func RegisterDateformatSink()
func RegisterSinkLumberjackSink ¶
func RegisterSinkLumberjackSink()
Types ¶
type Logger ¶
type Logger interface { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Debugw(msg string, keysAndValues ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Infow(msg string, keysAndValues ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Warnw(msg string, keysAndValues ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Errorw(msg string, keysAndValues ...interface{}) DPanic(args ...interface{}) DPanicf(format string, args ...interface{}) DPanicw(msg string, keysAndValues ...interface{}) Panic(v ...interface{}) Panicf(format string, args ...interface{}) Panicw(msg string, keysAndValues ...interface{}) Fatal(v ...interface{}) Fatalf(format string, args ...interface{}) Fatalw(msg string, keysAndValues ...interface{}) }
Logger logger interface
func GlobalInstance ¶
func GlobalInstance() Logger
Directories ¶
Path | Synopsis |
---|---|
dateformat @author LanguageY++2013 2023/5/10 16:33 @company soulgame
|
dateformat @author LanguageY++2013 2023/5/10 16:33 @company soulgame |