Documentation ¶
Index ¶
- Constants
- Variables
- func New(opts ...Option) *ronyLogger
- func NewSentryCore(sentryDSN, release, environment string, level zapcore.Level, ...) zapcore.Core
- func NewSyslogCore(levelEnabler zapcore.LevelEnabler, encoder zapcore.Encoder, tag string) (*syslogCore, error)
- func ProvideDI(opts ...Option)
- func SetLevel(level Level)
- type CallerEncode
- type CheckedEntry
- type DurationEncoder
- type Field
- type FieldType
- type Level
- type LevelEncoder
- type Logger
- type Option
- 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 ( DefaultLogger *ronyLogger NopLogger *ronyLogger )
Functions ¶
func NewSentryCore ¶
func NewSyslogCore ¶ added in v0.14.20
Types ¶
type CallerEncode ¶ added in v0.12.44
type CallerEncode = zapcore.CallerEncoder
type CheckedEntry ¶
type CheckedEntry = zapcore.CheckedEntry
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 WithWriter(w io.Writer) Logger }
type Option ¶ added in v0.15.2
type Option func(cfg *config)
func WithEnvironment ¶ added in v0.15.2
func WithMongoDB ¶ added in v0.15.2
func WithRelease ¶ added in v0.15.2
func WithSentry ¶ added in v0.15.2
func WithSkipCaller ¶ added in v0.15.2
func WithSyslog ¶ added in v0.15.2
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.