Documentation ¶
Index ¶
- Constants
- func DailyLogger(fileDir, filename string)
- func Debug(v ...interface{}) bool
- func Error(v ...interface{}) bool
- func Fatal(v ...interface{}) bool
- func Info(v ...interface{}) bool
- func JSON(js bool)
- func Log(v ...interface{}) bool
- func Post(url, param string) (string, error)
- func RollingLogger(fileDir, fileName string, maxNumber int32, maxSize int64, _unit UNIT)
- func SetConsole(isConsole bool)
- func SetLevel(_level int)
- func SetRemoteServerId(id string)
- func SetRemoteUrl(url string)
- func SetRollingFile(fileDir, fileName string, maxNumber int32, maxSize int64, _unit UNIT)
- func SetServiceName(name string)
- func Trace(level int, l *LogObj, v ...interface{}) bool
- func Warn(v ...interface{}) bool
- type LogFile
- type LogObj
- func (l *LogObj) Data(d interface{}) *LogObj
- func (l *LogObj) Debug(v ...interface{}) bool
- func (l *LogObj) Error(v ...interface{}) bool
- func (l *LogObj) Fatal(v ...interface{}) bool
- func (l *LogObj) GetData() interface{}
- func (l *LogObj) GetTag() string
- func (l *LogObj) ID(id string) *LogObj
- func (l *LogObj) Info(v ...interface{}) bool
- func (l *LogObj) JSON() *LogObj
- func (l *LogObj) Log(v ...interface{}) bool
- func (l *LogObj) Logid() string
- func (l *LogObj) Tag(tag string) *LogObj
- func (l *LogObj) UnJSON() *LogObj
- func (l *LogObj) Warn(v ...interface{}) bool
- type UNIT
Constants ¶
View Source
const ( LOG int = iota DEBUG INFO WARN ERROR FATAL )
View Source
const ( OS_LINUX = iota OS_X OS_WIN OS_OTHERS )
View Source
const ( //TimeDayFormat 日期格式化到日 TimeDayFormat = "2006-01-02" //TimeFormat 日期格式化到秒 TimeFormat = "2006-01-02 15:04:05" //TimeFormat2 毫秒时间 TimeFormat2 = "2006-01-02T15:04:05.000" )
Variables ¶
This section is empty.
Functions ¶
func RollingLogger ¶
RollingLogger 生成按文件大小及数量分割日子类
func SetRollingFile ¶
SetRollingFile 生成按文件大小及数量分割日子类
Types ¶
Click to show internal directories.
Click to hide internal directories.