Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(msg string, fields ...Field)
- func Error(msg string, fields ...Field)
- func ErrorOnError(guideText string, err error, args ...interface{})
- func Fatal(msg string, fields ...Field)
- func Info(msg string, fields ...Field)
- func NewSentryCore(sentryDSN, release, environment string, level zapcore.Level, ...) zapcore.Core
- func PanicOnError(guideText string, err error, args ...interface{})
- func SetLevel(level Level)
- func Warn(msg string, fields ...Field)
- func WarnOnError(guideText string, err error, args ...interface{})
- type CheckedEntry
- type Config
- type Field
- type FieldType
- type Level
- type Logger
Constants ¶
View Source
const ( DebugLevel = zapcore.DebugLevel InfoLevel = zapcore.InfoLevel WarnLevel = zapcore.WarnLevel ErrorLevel = zapcore.ErrorLevel FatalLevel = zapcore.FatalLevel )
Variables ¶
View Source
var DefaultConfig = Config{ Level: InfoLevel, DirPath: ".", Filename: "", SentryDSN: "", SentryLevel: WarnLevel, Release: "", Environment: "", }
View Source
var (
DefaultLogger *zapLogger
)
Functions ¶
func ErrorOnError ¶
PanicOnError
func NewSentryCore ¶
func PanicOnError ¶
PanicOnError
Types ¶
type CheckedEntry ¶
type CheckedEntry = zapcore.CheckedEntry
func Check ¶
func Check(level Level, msg string) *CheckedEntry
type Logger ¶
type Logger interface { Log(level Level, msg string, fields ...Field) Debug(msg string, fields ...Field) Info(msg string, fields ...Field) Warn(msg string, fields ...Field) Error(msg string, fields ...Field) Fatal(msg string, fields ...Field) Check(Level, string) *CheckedEntry Sync() error SetLevel(level Level) }
Click to show internal directories.
Click to hide internal directories.