Documentation
¶
Index ¶
- Constants
- func CloseLogger()
- 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 GetLogFileLine(depth int) (string, string, int)
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func SetLogDir(logDir string)
- func SetLogLevel(level string)
- func SetLogMode(logMode Mode)
- func Trace(args ...interface{})
- func Tracef(format string, args ...interface{})
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- type Logger
- func (l *Logger) IsLogDebug() bool
- func (l *Logger) IsLogError() bool
- func (l *Logger) IsLogFatal() bool
- func (l *Logger) IsLogInfo() bool
- func (l *Logger) IsLogTrace() bool
- func (l *Logger) IsLogWarn() bool
- func (l *Logger) PrintLogger()
- func (l *Logger) SetFileMaxSize(maxSize int)
- func (l *Logger) SetLogConfig(logDir, level string, maxSize, maxFileNum int, logMode Mode)
- func (l *Logger) SetLogDir(logDir string)
- func (l *Logger) SetLogHeader(header func(string) string)
- func (l *Logger) SetLogLevel(level string)
- func (l *Logger) SetLogMode(logMode Mode)
- func (l *Logger) SetMaxFileNum(maxFileNum int)
- type Mode
Constants ¶
View Source
const ( TRACE severity = iota DEBUG INFO WARN ERROR FATAL NumSeverity )
View Source
const ( ToFile = (1 << 0) ToStderr = (1 << 1) AlsoToStderr = (ToFile | ToStderr) )
Variables ¶
This section is empty.
Functions ¶
func CloseLogger ¶
func CloseLogger()
func GetLogFileLine ¶
get log filename, funcname and line number
func SetLogMode ¶
func SetLogMode(logMode Mode)
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) IsLogDebug ¶
func (*Logger) IsLogError ¶
func (*Logger) IsLogFatal ¶
func (*Logger) IsLogTrace ¶
func (*Logger) SetLogConfig ¶
func (*Logger) SetLogHeader ¶
userdef log header
func (*Logger) SetLogLevel ¶
Click to show internal directories.
Click to hide internal directories.