Documentation ¶
Index ¶
- Constants
- Variables
- func Any(key string, value interface{}) zap.Field
- func Error(err error) zap.Field
- func Int32(key string, val int32) zap.Field
- func Int64(key string, val int64) zap.Field
- func IsTerminal(f *os.File) bool
- func LevelString(l zapcore.Level) string
- func NewLogger(cfg config.Logging) error
- func Reflect(key string, val interface{}) zap.Field
- func SimpleAccessLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
- func SimpleLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
- func SimpleTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
- func Stack() zap.Field
- func String(key string, val string) zap.Field
- func Uint16(key string, val uint16) zap.Field
- func Uint32(key string, val uint32) zap.Field
- type Logger
Constants ¶
View Source
const CrashModule = "crash"
View Source
const HTTPModule = "http"
View Source
const (
LogFilename = "application.log"
)
Variables ¶
View Source
var AccessLog = GetLogger(HTTPModule, "Access")
View Source
var CrashLog = GetLogger(CrashModule, "Crash")
View Source
var (
RunningAtomicLevel = zap.NewAtomicLevelAt(zapcore.InfoLevel) //设置日志等级
)
Functions ¶
func LevelString ¶
func SimpleAccessLevelEncoder ¶
func SimpleAccessLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
func SimpleLevelEncoder ¶
func SimpleLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
func SimpleTimeEncoder ¶
func SimpleTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
Types ¶
Click to show internal directories.
Click to hide internal directories.