Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func Init(path, level string, needRequestLog bool, options ...LogOption)
- func NewZapAdapter(path, level string) *zapAdapter
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func RequestLogInfow(keysAndValues ...interface{})
- func Sync()
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type Log
- type LogOption
Constants ¶
View Source
const ( DebugLevel = "debug" InfoLevel = "info" WarnLevel = "warn" ErrorLevel = "error" PanicLevel = "panic" RequestLevel = "request" )
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(template string, args ...interface{})
Debugf 使用方法:log.Debugf("test:%s", err)
func Debugw ¶
func Debugw(msg string, keysAndValues ...interface{})
Debugw 使用方法:log.Debugw("test", "field1", "value1", "field2", "value2")
func NewZapAdapter ¶
func NewZapAdapter(path, level string) *zapAdapter
func RequestLogInfow ¶
func RequestLogInfow(keysAndValues ...interface{})
Types ¶
type LogOption ¶
type LogOption interface {
// contains filtered or unexported methods
}
func SetCompress ¶
func SetMaxBackups ¶
func SetMaxFileSize ¶
Click to show internal directories.
Click to hide internal directories.