1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00

temporary

This commit is contained in:
2022-07-29 09:46:29 +08:00
parent 135b3a983b
commit 35751f7fdb
14 changed files with 153 additions and 56 deletions

View File

@ -1,3 +1,23 @@
package logx
import (
"io"
"os"
)
type Rotate int
const (
None Rotate = iota // 不分割日志
Size // 按大小分割
Date // 按日期分割
)
type OutputOptions struct {
LogrusOutputOptions
}
func WithFile(filename string) (io.Writer, error) {
mode := os.FileMode(0644)
return os.OpenFile(filename, os.O_CREATE|os.O_WRONLY|os.O_APPEND, mode)
}