Documentation ¶
Index ¶
- Constants
- type Logger
- func (lg *Logger) Debug(v ...interface{})
- func (lg *Logger) DebugF(format string, a ...interface{})
- func (lg *Logger) Error(v ...interface{})
- func (lg *Logger) ErrorF(format string, a ...interface{})
- func (lg *Logger) Fatal(v ...interface{})
- func (lg *Logger) FatalF(format string, a ...interface{})
- func (lg *Logger) Info(v ...interface{})
- func (lg *Logger) InfoF(format string, a ...interface{})
- func (lg *Logger) Init(config string) error
- func (lg *Logger) Log(level int, v ...interface{})
- func (lg *Logger) LogF(level int, format string, a ...interface{})
- func (lg *Logger) Warn(v ...interface{})
- func (lg *Logger) WarnF(format string, a ...interface{})
- type OutputType
- type SliceType
Constants ¶
View Source
const ( CHECK_SLICE_FILE_INTERVAL = 180 //check slice file interval time CHANGE_LINE_FLAG = "\n" )
View Source
const ( DEFAULT_BUFFERSIZE_VALUE = 2048 //channel buffer size DEFAULT_OUTPUTTYPE_VALUE = OutputType_console DEFAULT_SLICETYPE_VALUE = 0 DEFAULT_PREFIX_VALUE = "" DEFAULT_LEVEL_VALUE = Level_Info DEFAULT_FILEDIR_VALUE = "./log" DEFAULT_FILENAME_VALUE = "logfile.log" DEFAULT_FILECOUNT_VALUE = 3 DEFAULT_FILESIZE_VALUE = 1024 * 1024 * 3 )
View Source
const ( Level_All = iota Level_Debug Level_Info Level_Warn Level_Error Level_Fatal )
log level
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
type OutputType ¶
type OutputType byte
the output type of logs
const ( OutputType_all OutputType = iota //both output to file and console OutputType_console //only output to console OutputType_file //only output to file )
Click to show internal directories.
Click to hide internal directories.