mirror of
https://gitee.com/shikong-sk/golang-study
synced 2025-02-22 23:12:15 +08:00
docs: 手动实现 simple log 日志库
This commit is contained in:
parent
42e5a2873d
commit
3fa854b08a
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user