Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func DisableZeroLog()
- 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(level string, options ...Option)
- func NewZapAdapter(level string) *zapAdapter
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func RequestLogInfow(msg string, keysAndValues ...interface{})
- func SetupZeroLog(c logx.LogConf)
- func Sync()
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- func WriteIO() io.Writer
- type Log
- type Option
Constants ¶
View Source
const ( DebugLevel = "debug" InfoLevel = "info" WarnLevel = "warn" ErrorLevel = "error" PanicLevel = "panic" FileTypeLog = "log" FileTypeRequest = "request_log" )
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 DisableZeroLog ¶ added in v0.1.5
func DisableZeroLog()
func NewZapAdapter ¶
func NewZapAdapter(level string) *zapAdapter
func RequestLogInfow ¶
func RequestLogInfow(msg string, keysAndValues ...interface{})
func SetupZeroLog ¶ added in v0.1.5
Types ¶
type Log ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func SetCompress ¶
func SetFileOut ¶
func SetMaxBackups ¶
func SetMaxFileSize ¶
func SetRequest ¶
func SetRequest() Option
Click to show internal directories.
Click to hide internal directories.