Documentation ¶
Overview ¶
a simple log lib some code from code.google.com/p/log4go console log is open, file and sock log is close by default you can use functin SetxxxLevel open or close the log pattern it will only print the log whose level is higher than the pattern's level
Index ¶
- func FormatLogRecord(rec *LogRecord) string
- type FileLogWriter
- type Level
- type LogRecord
- type Logger
- func (log *Logger) Close()
- func (log *Logger) Critical(arg0 interface{}, args ...interface{})
- func (log *Logger) Debug(arg0 interface{}, args ...interface{})
- func (log *Logger) Error(arg0 interface{}, args ...interface{})
- func (log *Logger) Info(arg0 interface{}, args ...interface{})
- func (log *Logger) SetFileLevel(lvl Level, fname string, param ...int)
- func (log *Logger) SetLevel(lvl Level)
- func (log *Logger) SetTermLevel(lvl Level)
- func (log *Logger) System(arg0 interface{}, args ...interface{})
- func (log *Logger) Warn(arg0 interface{}, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLogRecord ¶
Types ¶
type FileLogWriter ¶
type FileLogWriter struct {
// contains filtered or unexported fields
}
This log writer sends output to a file
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewFileLogger ¶
func NewFileLoggerWithoutTerm ¶ added in v1.1.0
func (*Logger) SetFileLevel ¶
等级 文件名 log文件最大值 是否每天滚动 最大备份文件个数 param: maxsize int (the maxsize of single log file), daily int(is rotate daily), maxbackup int(max count of the backup log files)
func (*Logger) SetTermLevel ¶
Click to show internal directories.
Click to hide internal directories.