docs: 手动实现 simple log 日志库

This commit is contained in:
Shikong 2021-10-06 15:46:15 +08:00
parent 42e5a2873d
commit 3fa854b08a

View File

@ -19,7 +19,7 @@ func (l LogLevel) String() string {
return l.s
}
type LevelFlag uint8
type LevelFlag int
const (
FlagInfo LevelFlag = 0x1
@ -127,6 +127,7 @@ var defaultOption = &Option{
LevelFlag: FlagInfo | FlagWarn | FlagError | FlagDebug,
}
// NewOption 构造 Option 参数
func NewOption(opts ...OptionFunc) (opt *Option) {
opt = defaultOption
for _, o := range opts {