Documentation
¶
Overview ¶
log的简单封装 我所期待的log接口(我在工作环境熟悉的)是这样的: 1. 日志分为多个文件,一个普通INFO日志,一个DEBUG,另外一个是WARN,ERROR,FATAL类型 2. INFO一般不采用调用一次打一行日志 3. INFO一般一次逻辑处理只打一行 4. 除了INFO之外,其它每调用一次,输出一行日志.
Index ¶
- func Debug(arg0 interface{}, args ...interface{}) error
- func Error(arg0 interface{}, args ...interface{}) error
- func Info(arg0 interface{}, args ...interface{}) error
- func LoadConfiguration(confPath string) error
- func Warn(arg0 interface{}, args ...interface{}) error
- type GooseLogger
- func (GooseLogger) Debug(arg0 interface{}, args ...interface{}) error
- func (GooseLogger) Error(arg0 interface{}, args ...interface{}) error
- func (this *GooseLogger) Info(arg ...interface{}) error
- func (this *GooseLogger) PrintAllInfo() error
- func (GooseLogger) Warn(arg0 interface{}, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfiguration ¶
Types ¶
type GooseLogger ¶
type GooseLogger struct {
// contains filtered or unexported fields
}
func NewGooseLogger ¶
func NewGooseLogger() *GooseLogger
func (GooseLogger) Debug ¶
func (GooseLogger) Debug(arg0 interface{}, args ...interface{}) error
func (GooseLogger) Error ¶
func (GooseLogger) Error(arg0 interface{}, args ...interface{}) error
func (*GooseLogger) Info ¶
func (this *GooseLogger) Info(arg ...interface{}) error
Info日志先存起来,调用PrintAllInfo的时候输出日志 支持日常用法 Info(object,xxx) : 输出一个对象的字符串化表示,忽略后面的参数 Info(string) : 直接输出 Info(strA,strB) : 输出strA:strB Info(strA,object) : 输出strA : object.string()
func (GooseLogger) Warn ¶
func (GooseLogger) Warn(arg0 interface{}, args ...interface{}) error
Click to show internal directories.
Click to hide internal directories.