gfwproxyshadowsocksdocker-imagegogolanggvisornatnetworksocks4socks5tcpip-stacktortun-devicetun2sockstunneludpwireguard
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.
31 lines
696 B
31 lines
696 B
package log
|
|
|
|
import (
|
|
"go.uber.org/zap/zapcore"
|
|
)
|
|
|
|
// Level is an alias for zapcore.Level.
|
|
type Level = zapcore.Level
|
|
|
|
// Levels are aliases for Level.
|
|
const (
|
|
DebugLevel = zapcore.DebugLevel
|
|
InfoLevel = zapcore.InfoLevel
|
|
WarnLevel = zapcore.WarnLevel
|
|
ErrorLevel = zapcore.ErrorLevel
|
|
DPanicLevel = zapcore.DPanicLevel
|
|
PanicLevel = zapcore.PanicLevel
|
|
FatalLevel = zapcore.FatalLevel
|
|
InvalidLevel = zapcore.InvalidLevel
|
|
SilentLevel = InvalidLevel + 1
|
|
)
|
|
|
|
// ParseLevel is a thin wrapper for zapcore.ParseLevel.
|
|
func ParseLevel(text string) (Level, error) {
|
|
switch text {
|
|
case "silent", "SILENT":
|
|
return SilentLevel, nil
|
|
default:
|
|
return zapcore.ParseLevel(text)
|
|
}
|
|
}
|
|
|