Documentation ¶
Index ¶
- type Config
- func (c *Config) DisableConsoleOut()
- func (c *Config) DisableJSONFormat()
- func (c *Config) EnableConsoleOut()
- func (c *Config) EnableJSONFormat()
- func (c *Config) SetCallerSkip(callerSkip int)
- func (c *Config) SetFileOut(path, name string, rotationTime, rotationCount uint)
- func (c *Config) SetLevel(level string)
- func (c *Config) SetProjectName(projectName string)
- func (c *Config) SetStacktraceLevel(level string)
- type Logger
- func (l *Logger) ApplyConfig()
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(template string, args ...interface{})
- func (l *Logger) Debugw(msg string, keysAndValues ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(template string, args ...interface{})
- func (l *Logger) Errorw(msg string, keysAndValues ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(template string, args ...interface{})
- func (l *Logger) Fatalw(msg string, keysAndValues ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(template string, args ...interface{})
- func (l *Logger) Infow(msg string, keysAndValues ...interface{})
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) Panicf(template string, args ...interface{})
- func (l *Logger) Panicw(msg string, keysAndValues ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(template string, args ...interface{})
- func (l *Logger) Warnw(msg string, keysAndValues ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config log配置文件
func (*Config) DisableConsoleOut ¶
func (c *Config) DisableConsoleOut()
DisableConsoleOut 关闭Console输出
func (*Config) DisableJSONFormat ¶
func (c *Config) DisableJSONFormat()
DisableJSONFormat 关闭JSON格式化输出
func (*Config) SetCallerSkip ¶
SetCallerSkip 设置callerSkip次数
func (*Config) SetFileOut ¶
SetFileOut 设置日志输出文件
func (*Config) SetProjectName ¶
SetProjectName 设置ProjectName
func (*Config) SetStacktraceLevel ¶
SetStacktraceLevel 设置堆栈跟踪的日志级别
type Logger ¶
type Logger struct { Config *Config // contains filtered or unexported fields }
Logger Logger
Click to show internal directories.
Click to hide internal directories.