You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
2.2 KiB
38 lines
2.2 KiB
package logs
|
|
|
|
import (
|
|
"io"
|
|
"time"
|
|
)
|
|
|
|
var std = New(&Options{Level: LevelInfo})
|
|
|
|
func Default() Logger { return std }
|
|
|
|
func SetFlags(flags int) { Default().SetFlags(flags) }
|
|
func Flags() int { return Default().Flags() }
|
|
func SetTimezone(loc *time.Location) { Default().SetTimezone(loc) }
|
|
func Timezone() *time.Location { return Default().Timezone() }
|
|
func SetLevel(level Level) { Default().SetLevel(level) }
|
|
func GetLevel() Level { return Default().Level() }
|
|
func SetPersistWriter(w io.Writer) { Default().SetPersistWriter(w) }
|
|
func SetWriter(w io.Writer) { Default().SetWriter(w) }
|
|
func With(args ...Attr) Logger { return Default().With(args...) }
|
|
func WithGroup(name string) Logger { return Default().WithGroup(name) }
|
|
func Enabled(level Level) bool { return Default().Enabled(level) }
|
|
func Log(level Level, msg string, args ...any) { Default().Log(level, msg, args...) }
|
|
func ForkLevel(level Level, msg string, args ...any) ChildLogger {
|
|
return Default().ForkLevel(level, msg, args...)
|
|
}
|
|
func Trace(msg string, args ...any) { Default().Trace(msg, args...) }
|
|
func ForkTrace(msg string, args ...any) ChildLogger { return Default().ForkTrace(msg, args...) }
|
|
func Debug(msg string, args ...any) { Default().Debug(msg, args...) }
|
|
func ForkDebug(msg string, args ...any) ChildLogger { return Default().ForkDebug(msg, args...) }
|
|
func Info(msg string, args ...any) { Default().Info(msg) }
|
|
func ForkInfo(msg string, args ...any) ChildLogger { return Default().ForkInfo(msg, args...) }
|
|
func Warn(msg string, args ...any) { Default().Warn(msg, args...) }
|
|
func ForkWarn(msg string, args ...any) ChildLogger { return Default().ForkWarn(msg, args...) }
|
|
func Error(msg string, args ...any) { Default().Error(msg, args...) }
|
|
func ForkError(msg string, args ...any) ChildLogger { return Default().ForkError(msg, args...) }
|
|
func Fatal(msg string, args ...any) { Default().Fatal(msg, args...) }
|
|
func ForkFatal(msg string, args ...any) ChildLogger { return Default().ForkFatal(msg, args...) }
|
|
|