logging/README.md

35 lines
656 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# logging
日志组件
## 使用说明
日志组件封装了uber/zap使用基本一致
```
package main
import(
"git.hpds.cc/Component/logging"
"go.uber.org/zap/zapcore"
)
func main(){
opt := Options{
Path : "./log/",
Prefix : "",
ErrorFileSuffix: "",
WarnFileSuffix : "",
InfoFileSuffix : "",
DebugFileSuffix: "",
Level : zapcore.DebugLevel,
MaxSize : 100,
MaxBackups : 1000,
MaxAge : 30,
Development : true,
}
logger := logging.NewLogger()
logger.Info("this is a test log")
}
```