Documentation
¶
Index ¶
- Variables
- func Close() error
- func Error(format string, args ...interface{})
- func Errorv(ctx context.Context, fields ...Field)
- func Errorw(args ...interface{})
- func Info(format string, args ...interface{})
- func Infov(ctx context.Context, fields ...Field)
- func Infow(args ...interface{})
- func Init(conf *Config)
- func SugarSync()
- func Sync()
- func Warn(format string, args ...interface{})
- func Warnv(ctx context.Context, fields ...Field)
- func Warnw(args ...interface{})
- type Config
- type Field
- type Logger
- type SugaredLogger
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Error ¶
func Error(format string, args ...interface{})
Error logs a message at the error log level.
func Errorw ¶
func Errorw(args ...interface{})
Errorw logs a message with some additional context. The variadic key-value pairs are treated as they are in With.
func Info ¶
func Info(format string, args ...interface{})
Info logs a message at the info log level.
func Infow ¶
func Infow(args ...interface{})
Infow logs a message with some additional context. The variadic key-value pairs are treated as they are in With.
func Warn ¶
func Warn(format string, args ...interface{})
Warn logs a message at the warning log level.
Types ¶
type Config ¶
type Config struct { // stdout Stdout bool // level Level zapcore.Level // file Dir string // MaxLogFileSize MaxLogFileSize int // MaxLogAge MaxLogAge int // MaxLogBackups MaxLogBackups int // LogCompress LogCompress bool }
Config log config.
type SugaredLogger ¶
type SugaredLogger = *zap.SugaredLogger
Click to show internal directories.
Click to hide internal directories.