Skip to content

Commit 0ee1e0e

Browse files
committed
导出日志函数
1 parent 2c647ce commit 0ee1e0e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

log/log.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,13 @@ func SetLevelByString(level string) {
7575
func SetColor(color bool) {
7676
mlog.SetColor(color)
7777
}
78+
79+
//SetOutputFile 初始化时设置输出文件.
80+
func SetOutputFile(f string) {
81+
mlog.SetOutputFile(f)
82+
}
83+
84+
//SetRolling 每天生成一个文件.
85+
func SetRolling(on bool) {
86+
mlog.SetRolling(on)
87+
}

0 commit comments

Comments
 (0)