Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(msg string, fields ...Field)
- func Error(msg string, fields ...Field)
- func Fatal(msg string, fields ...Field)
- func Info(msg string, fields ...Field)
- func Init(config Config)
- func New(cfg Config) *ronyLogger
- func NewSentryCore(sentryDSN, release, environment string, level zapcore.Level, ...) zapcore.Core
- func ProvideDI(cfg Config)
- func SetLevel(level Level)
- func Warn(msg string, fields ...Field)
- type CallerEncode
- type CheckedEntry
- type Config
- type DurationEncoder
- type Field
- type FieldType
- type Level
- type LevelEncoder
- type Logger
- type SugaredLogger
- type TimeEncoder
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: ".", SentryDSN: "", SentryLevel: WarnLevel, Release: "", Environment: "", SkipCaller: 2, TimeEncoder: timeEncoder, LevelEncoder: zapcore.CapitalLevelEncoder, DurationEncoder: zapcore.StringDurationEncoder, CallerEncoder: zapcore.ShortCallerEncoder, }
View Source
var (
DefaultLogger *ronyLogger
)
Functions ¶
func NewSentryCore ¶
Types ¶
type CallerEncode ¶ added in v0.12.44
type CallerEncode = zapcore.CallerEncoder
type CheckedEntry ¶
type CheckedEntry = zapcore.CheckedEntry
func Check ¶
func Check(level Level, msg string) *CheckedEntry
type Config ¶
type Config struct { Level Level DirPath string SentryDSN string SentryLevel Level Release string Environment string SkipCaller int TimeEncoder TimeEncoder LevelEncoder LevelEncoder DurationEncoder DurationEncoder CallerEncoder CallerEncode }
type DurationEncoder ¶ added in v0.12.44
type DurationEncoder = zapcore.DurationEncoder
type LevelEncoder ¶ added in v0.12.44
type LevelEncoder = zapcore.LevelEncoder
type Logger ¶
type Logger interface { 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 Sugared() *sugaredRonyLogger SetLevel(level Level) With(name string) Logger }
type SugaredLogger ¶
type SugaredLogger interface { Debugf(template string, args ...interface{}) Infof(template string, args ...interface{}) Printf(template string, args ...interface{}) Warnf(template string, args ...interface{}) Errorf(template string, args ...interface{}) Fatalf(template string, args ...interface{}) Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) Fatal(args ...interface{}) Panic(args ...interface{}) }
type TimeEncoder ¶ added in v0.12.44
type TimeEncoder = zapcore.TimeEncoder
Click to show internal directories.
Click to hide internal directories.