Documentation ¶
Index ¶
- func DPanic(msg string, fields ...zapcore.Field)
- func Debug(msg string, fields ...zapcore.Field)
- func ELKTempName(eLKTempName string) zapLoggerOption
- func Error(msg string, fields ...zapcore.Field)
- func Fatal(msg string, fields ...zapcore.Field)
- func HostName(hostname string) zapLoggerOption
- func Info(msg string, fields ...zapcore.Field)
- func InitZapLogger(options ...zapLoggerOption) error
- func IsTestEnv(isTestEnv bool) zapLoggerOption
- func ListenAddr(addr string) zapLoggerOption
- func LogApiPath(logApiPath string) zapLoggerOption
- func LogPath(path string) zapLoggerOption
- func Panic(msg string, fields ...zapcore.Field)
- func ProcessName(processName string) zapLoggerOption
- func SetLogLevel(level string) error
- func Sync() error
- func Warn(msg string, fields ...zapcore.Field)
- func WithPid(withPid bool) zapLoggerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DPanic ¶
DPanic logs a message at DPanicLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
If the logger is in development mode, it then panics (DPanic means "development panic"). This is useful for catching errors that are recoverable, but shouldn't ever happen.
func Debug ¶
Debug logs a message at DebugLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
func ELKTempName ¶
func ELKTempName(eLKTempName string) zapLoggerOption
func Error ¶
Error logs a message at ErrorLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
func Fatal ¶
Fatal logs a message at FatalLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
The logger then calls os.Exit(1), even if logging at FatalLevel is disabled.
func Info ¶
Info logs a message at InfoLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
func InitZapLogger ¶
func InitZapLogger(options ...zapLoggerOption) error
func ListenAddr ¶
func ListenAddr(addr string) zapLoggerOption
func LogApiPath ¶
func LogApiPath(logApiPath string) zapLoggerOption
func Panic ¶
Panic logs a message at PanicLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
The logger then panics, even if logging at PanicLevel is disabled.
func ProcessName ¶
func ProcessName(processName string) zapLoggerOption
func SetLogLevel ¶
Types ¶
This section is empty.