There was an error while loading. Please reload this page.
复制以下代码至项目中,并在其中引用日志组件的方法进行打印log
type DefaultLogger struct { } func (this *DefaultLogger)Debugf(format string, params ...interface{}) { } func (this *DefaultLogger)Infof(format string, params ...interface{}) { } func (this *DefaultLogger)Warnf(format string, params ...interface{}) error { return nil } func (this *DefaultLogger)Errorf(format string, params ...interface{}) error { return nil } func (this *DefaultLogger)Debug(v ...interface{}) { } func (this *DefaultLogger)Info(v ...interface{}){ } func (this *DefaultLogger)Warn(v ...interface{}) error{ return nil } func (this *DefaultLogger)Error(v ...interface{}) error{ return nil }
func main() { agollo.SetLogger(loggerInterface) agollo.Start() }
设计文档
开发文档
基本使用
高级使用