Documentation ¶
Index ¶
- Constants
- func ActivateSpec(spec string)
- func DefaultLevel() string
- func Init(config Config)
- func InitBackend(formatter logging.Formatter, output io.Writer)
- func InitFromSpec(spec string) string
- func IsValidLevel(level string) bool
- func LoggerLevel(loggerName string) string
- func NameToLevel(level string) zapcore.Level
- func NewGRPCLogger(l *zap.Logger) *zapgrpc.Logger
- func NewZapLogger(core zapcore.Core, options ...zap.Option) *zap.Logger
- func Reset()
- func SetFormat(formatSpec string) logging.Formatter
- func SetWriter(w io.Writer) io.Writer
- type Config
- type Core
- type Encoding
- type EncodingSelector
- type FabricLogger
- func (f *FabricLogger) Critical(args ...interface{})
- func (f *FabricLogger) Criticalf(template string, args ...interface{})
- func (f *FabricLogger) DPanic(args ...interface{})
- func (f *FabricLogger) DPanicf(template string, args ...interface{})
- func (f *FabricLogger) DPanicw(msg string, kvPairs ...interface{})
- func (f *FabricLogger) Debug(args ...interface{})
- func (f *FabricLogger) Debugf(template string, args ...interface{})
- func (f *FabricLogger) Debugw(msg string, kvPairs ...interface{})
- func (f *FabricLogger) Error(args ...interface{})
- func (f *FabricLogger) Errorf(template string, args ...interface{})
- func (f *FabricLogger) Errorw(msg string, kvPairs ...interface{})
- func (f *FabricLogger) Fatal(args ...interface{})
- func (f *FabricLogger) Fatalf(template string, args ...interface{})
- func (f *FabricLogger) Fatalw(msg string, kvPairs ...interface{})
- func (f *FabricLogger) Info(args ...interface{})
- func (f *FabricLogger) Infof(template string, args ...interface{})
- func (f *FabricLogger) Infow(msg string, kvPairs ...interface{})
- func (f *FabricLogger) IsEnabledFor(level zapcore.Level) bool
- func (f *FabricLogger) Named(name string) *FabricLogger
- func (f *FabricLogger) Notice(args ...interface{})
- func (f *FabricLogger) Noticef(template string, args ...interface{})
- func (f *FabricLogger) Panic(args ...interface{})
- func (f *FabricLogger) Panicf(template string, args ...interface{})
- func (f *FabricLogger) Panicw(msg string, kvPairs ...interface{})
- func (f *FabricLogger) Sync() error
- func (f *FabricLogger) Warn(args ...interface{})
- func (f *FabricLogger) Warnf(template string, args ...interface{})
- func (f *FabricLogger) Warning(args ...interface{})
- func (f *FabricLogger) Warningf(template string, args ...interface{})
- func (f *FabricLogger) Warnw(msg string, kvPairs ...interface{})
- func (f *FabricLogger) With(args ...interface{}) *FabricLogger
- func (f *FabricLogger) WithOptions(opts ...zap.Option) *FabricLogger
- func (f *FabricLogger) Zap() *zap.Logger
- type Logger
- type LoggerLevels
- type Logging
- func (l *Logging) Apply(c Config) error
- func (l *Logging) Check(e zapcore.Entry, ce *zapcore.CheckedEntry)
- func (l *Logging) Encoding() Encoding
- func (l *Logging) Logger(name string) *FabricLogger
- func (l *Logging) SetFormat(format string) error
- func (l *Logging) SetObserver(observer Observer) Observer
- func (l *Logging) SetWriter(w io.Writer) io.Writer
- func (l *Logging) Sync() error
- func (l *Logging) Write(b []byte) (int, error)
- func (l *Logging) WriteEntry(e zapcore.Entry, fields []zapcore.Field)
- func (l *Logging) ZapLogger(name string) *zap.Logger
- type ModuleLevels
- type Observer
Constants ¶
View Source
const ( CONSOLE = iota JSON LOGFMT )
View Source
const ( DisabledLevel = zapcore.Level(math.MinInt8) PayloadLevel = zapcore.Level(zapcore.DebugLevel - 1) )
View Source
const GRPCModuleID = "grpc"
Variables ¶
This section is empty.
Functions ¶
func ActivateSpec ¶
func ActivateSpec(spec string)
func DefaultLevel ¶
func DefaultLevel() string
func InitFromSpec ¶
func IsValidLevel ¶
func LoggerLevel ¶
func NameToLevel ¶
Types ¶
type Core ¶
type Core struct { zapcore.LevelEnabler Levels *LoggerLevels Encoders map[Encoding]zapcore.Encoder Selector EncodingSelector Output zapcore.WriteSyncer Observer Observer }
func (*Core) Check ¶
func (c *Core) Check(e zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry
type EncodingSelector ¶
type EncodingSelector interface {
Encoding() Encoding
}
type FabricLogger ¶
type FabricLogger struct {
// contains filtered or unexported fields
}
func MustGetLogger ¶
func MustGetLogger(loggerName string) *FabricLogger
func NewFabricLogger ¶
func NewFabricLogger(l *zap.Logger, options ...zap.Option) *FabricLogger
func (*FabricLogger) Critical ¶
func (f *FabricLogger) Critical(args ...interface{})
func (*FabricLogger) Criticalf ¶
func (f *FabricLogger) Criticalf(template string, args ...interface{})
func (*FabricLogger) DPanic ¶
func (f *FabricLogger) DPanic(args ...interface{})
func (*FabricLogger) DPanicf ¶
func (f *FabricLogger) DPanicf(template string, args ...interface{})
func (*FabricLogger) DPanicw ¶
func (f *FabricLogger) DPanicw(msg string, kvPairs ...interface{})
func (*FabricLogger) Debug ¶
func (f *FabricLogger) Debug(args ...interface{})
func (*FabricLogger) Debugf ¶
func (f *FabricLogger) Debugf(template string, args ...interface{})
func (*FabricLogger) Debugw ¶
func (f *FabricLogger) Debugw(msg string, kvPairs ...interface{})
func (*FabricLogger) Error ¶
func (f *FabricLogger) Error(args ...interface{})
func (*FabricLogger) Errorf ¶
func (f *FabricLogger) Errorf(template string, args ...interface{})
func (*FabricLogger) Errorw ¶
func (f *FabricLogger) Errorw(msg string, kvPairs ...interface{})
func (*FabricLogger) Fatal ¶
func (f *FabricLogger) Fatal(args ...interface{})
func (*FabricLogger) Fatalf ¶
func (f *FabricLogger) Fatalf(template string, args ...interface{})
func (*FabricLogger) Fatalw ¶
func (f *FabricLogger) Fatalw(msg string, kvPairs ...interface{})
func (*FabricLogger) Info ¶
func (f *FabricLogger) Info(args ...interface{})
func (*FabricLogger) Infof ¶
func (f *FabricLogger) Infof(template string, args ...interface{})
func (*FabricLogger) Infow ¶
func (f *FabricLogger) Infow(msg string, kvPairs ...interface{})
func (*FabricLogger) IsEnabledFor ¶
func (f *FabricLogger) IsEnabledFor(level zapcore.Level) bool
func (*FabricLogger) Named ¶
func (f *FabricLogger) Named(name string) *FabricLogger
func (*FabricLogger) Notice ¶
func (f *FabricLogger) Notice(args ...interface{})
func (*FabricLogger) Noticef ¶
func (f *FabricLogger) Noticef(template string, args ...interface{})
func (*FabricLogger) Panic ¶
func (f *FabricLogger) Panic(args ...interface{})
func (*FabricLogger) Panicf ¶
func (f *FabricLogger) Panicf(template string, args ...interface{})
func (*FabricLogger) Panicw ¶
func (f *FabricLogger) Panicw(msg string, kvPairs ...interface{})
func (*FabricLogger) Sync ¶
func (f *FabricLogger) Sync() error
func (*FabricLogger) Warn ¶
func (f *FabricLogger) Warn(args ...interface{})
func (*FabricLogger) Warnf ¶
func (f *FabricLogger) Warnf(template string, args ...interface{})
func (*FabricLogger) Warning ¶
func (f *FabricLogger) Warning(args ...interface{})
func (*FabricLogger) Warningf ¶
func (f *FabricLogger) Warningf(template string, args ...interface{})
func (*FabricLogger) Warnw ¶
func (f *FabricLogger) Warnw(msg string, kvPairs ...interface{})
func (*FabricLogger) With ¶
func (f *FabricLogger) With(args ...interface{}) *FabricLogger
func (*FabricLogger) WithOptions ¶
func (f *FabricLogger) WithOptions(opts ...zap.Option) *FabricLogger
func (*FabricLogger) Zap ¶
func (f *FabricLogger) Zap() *zap.Logger
type Logger ¶
type Logger interface { Critical(args ...interface{}) Criticalf(format string, args ...interface{}) Debug(args ...interface{}) Debugf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Notice(args ...interface{}) Noticef(format string, args ...interface{}) Panic(args ...interface{}) Panicf(format string, args ...interface{}) Warning(args ...interface{}) Warningf(format string, args ...interface{}) }
type LoggerLevels ¶
type LoggerLevels struct {
// contains filtered or unexported fields
}
func (*LoggerLevels) ActivateSpec ¶
func (l *LoggerLevels) ActivateSpec(spec string) error
func (*LoggerLevels) DefaultLevel ¶
func (l *LoggerLevels) DefaultLevel() zapcore.Level
func (*LoggerLevels) Spec ¶
func (l *LoggerLevels) Spec() string
type Logging ¶
type Logging struct { *LoggerLevels // contains filtered or unexported fields }
var Global *Logging
func (*Logging) Logger ¶
func (l *Logging) Logger(name string) *FabricLogger
func (*Logging) SetObserver ¶
type ModuleLevels ¶
type ModuleLevels struct {
// contains filtered or unexported fields
}
func (*ModuleLevels) ActivateSpec ¶
func (m *ModuleLevels) ActivateSpec(spec string) error
func (*ModuleLevels) DefaultLevel ¶
func (m *ModuleLevels) DefaultLevel() zapcore.Level
func (*ModuleLevels) Spec ¶
func (m *ModuleLevels) Spec() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.