Documentation ¶
Index ¶
- Variables
- func ConsoleDebug() *zap.Logger
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func GetCurrentPath() (string, error)
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func NewConsole() zapcore.Core
- func NewConsoleDebug() zapcore.Core
- func NewLogger() *zap.Logger
- func NewZapLog(path, prefix string, stdoutFlag bool) (log *zap.Logger)
- func NewZlog(debugLevel bool) (logger *zap.Logger)
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warning(args ...interface{})
- func Warningf(template string, args ...interface{})
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(template string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(template string, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(template string, args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(template string, args ...interface{})
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) Panicf(template string, args ...interface{})
- func (l *Logger) Print(args ...interface{})
- func (l *Logger) Printf(format string, args ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(template string, args ...interface{})
- func (l *Logger) Warning(args ...interface{})
- func (l *Logger) Warningf(template string, args ...interface{})
- func (l *Logger) With(key string, value interface{}) *Logger
- func (l *Logger) WithField(key string, value interface{}) *Logger
- func (l *Logger) WithFields(fields map[string]interface{}) *Logger
- type ZapLogger
Constants ¶
This section is empty.
Variables ¶
var LogLevel = zap.NewAtomicLevelAt(zap.DebugLevel)
LogLevel log level
Functions ¶
func ConsoleDebug ¶ added in v0.3.2
ConsoleDebug console log for debug
func Debugf ¶
func Debugf(template string, args ...interface{})
Debugf logs a message at level Debug on the ZapLogger.
func Errorf ¶
func Errorf(template string, args ...interface{})
Errorf logs a message at level Warn on the ZapLogger.
func Fatalf ¶
func Fatalf(template string, args ...interface{})
Fatalf logs a message at level Warn on the ZapLogger.
func GetCurrentPath ¶
func Infof ¶
func Infof(template string, args ...interface{})
Infof logs a message at level Info on the ZapLogger.
func NewConsole ¶ added in v0.3.1
NewConsole new zap logger for console
func NewConsoleDebug ¶ added in v0.3.1
NewConsoleDebug new zap logger for console
func Panicf ¶
func Panicf(template string, args ...interface{})
Panicf logs a message at level Warn on the ZapLogger.
func Printf ¶
func Printf(format string, args ...interface{})
Printf logs a message at level Info on the ZapLogger.
func Println ¶
func Println(args ...interface{})
Println logs a message at level Info on the ZapLogger.
func Warnf ¶
func Warnf(template string, args ...interface{})
Warnf logs a message at level Warn on the ZapLogger.
Types ¶
type Logger ¶
Logger zap log
var Default *Logger
Default default log
func InitZapLogger ¶ added in v0.2.6
InitZapLogger initial
func (*Logger) Debug ¶
func (l *Logger) Debug(args ...interface{})
Debug logs a message at level Debug on the ZapLogger.
func (*Logger) Error ¶
func (l *Logger) Error(args ...interface{})
Error logs a message at level Error on the ZapLogger.
func (*Logger) Fatal ¶
func (l *Logger) Fatal(args ...interface{})
Fatal logs a message at level Fatal on the ZapLogger.
func (*Logger) Info ¶
func (l *Logger) Info(args ...interface{})
Info logs a message at level Info on the ZapLogger.
func (*Logger) Panic ¶
func (l *Logger) Panic(args ...interface{})
Panic logs a message at level Painc on the ZapLogger.
func (*Logger) Print ¶
func (l *Logger) Print(args ...interface{})
Print logs a message at level Info on the ZapLogger.
func (*Logger) Warn ¶
func (l *Logger) Warn(args ...interface{})
Warn logs a message at level Warn on the ZapLogger.
func (*Logger) Warning ¶ added in v0.3.0
func (l *Logger) Warning(args ...interface{})
Warning logs a message at level Warn on the ZapLogger.
func (*Logger) WithFields ¶
WithFields return a log with extra fields.
Directories ¶
Path | Synopsis |
---|---|
Package ginzap provides a logging middleware to get https://github.com/uber-go/zap as logging library for https://github.com/gin-gonic/gin.
|
Package ginzap provides a logging middleware to get https://github.com/uber-go/zap as logging library for https://github.com/gin-gonic/gin. |
Package zapgrpc2 provides a logger that is compatible with grpclog.
|
Package zapgrpc2 provides a logger that is compatible with grpclog. |