Versions in this module Expand all Collapse all v0 v0.1.0 Jun 14, 2021 Changes in this version + const DPanicLevel + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const PanicLevel + const WarnLevel + func CombineWriteSyncers(writers ...qlogcore.WriteSyncer) qlogcore.WriteSyncer + func LevelFlag(name string, defaultLevel qlogcore.Level, usage string) *qlogcore.Level + func NewDevelopmentEncoderConfig() qlogcore.EncoderConfig + func NewProductionEncoderConfig() qlogcore.EncoderConfig + func NewStdLog(l *Logger) *log.Logger + func NewStdLogAt(l *Logger, level qlogcore.Level) (*log.Logger, error) + func Open(paths ...string) (qlogcore.WriteSyncer, func(), error) + func RedirectStdLog(l *Logger) func() + func RedirectStdLogAt(l *Logger, level qlogcore.Level) (func(), error) + func RegisterEncoder(name string, ...) error + func RegisterSink(scheme string, factory func(*url.URL) (Sink, error)) error + func ReplaceGlobals(logger *Logger) func() + type AtomicLevel struct + func NewAtomicLevel() AtomicLevel + func NewAtomicLevelAt(l qlogcore.Level) AtomicLevel + func (lvl *AtomicLevel) UnmarshalText(text []byte) error + func (lvl AtomicLevel) Enabled(l qlogcore.Level) bool + func (lvl AtomicLevel) Level() qlogcore.Level + func (lvl AtomicLevel) MarshalText() (text []byte, err error) + func (lvl AtomicLevel) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (lvl AtomicLevel) SetLevel(l qlogcore.Level) + func (lvl AtomicLevel) String() string + type Clock interface + Now func() time.Time + type Config struct + Development bool + DisableCaller bool + DisableStacktrace bool + EncoderConfig qlogcore.EncoderConfig + Encoding string + ErrorOutputPaths []string + InitialFields map[string]interface{} + Level AtomicLevel + OutputPaths []string + Sampling *SamplingConfig + func NewDevelopmentConfig() Config + func NewProductionConfig() Config + func (cfg Config) Build(opts ...Option) (*Logger, error) + type Field = qlogcore.Field + func Any(key string, value interface{}) Field + func Array(key string, val qlogcore.ArrayMarshaler) Field + func Binary(key string, val []byte) Field + func Bool(key string, val bool) Field + func Boolp(key string, val *bool) Field + func Bools(key string, bs []bool) Field + func ByteString(key string, val []byte) Field + func ByteStrings(key string, bss [][]byte) Field + func Complex128(key string, val complex128) Field + func Complex128p(key string, val *complex128) Field + func Complex128s(key string, nums []complex128) Field + func Complex64(key string, val complex64) Field + func Complex64p(key string, val *complex64) Field + func Complex64s(key string, nums []complex64) Field + func Duration(key string, val time.Duration) Field + func Durationp(key string, val *time.Duration) Field + func Durations(key string, ds []time.Duration) Field + func Error(err error) Field + func Errors(key string, errs []error) Field + func Float32(key string, val float32) Field + func Float32p(key string, val *float32) Field + func Float32s(key string, nums []float32) Field + func Float64(key string, val float64) Field + func Float64p(key string, val *float64) Field + func Float64s(key string, nums []float64) Field + func Inline(val qlogcore.ObjectMarshaler) Field + func Int(key string, val int) Field + func Int16(key string, val int16) Field + func Int16p(key string, val *int16) Field + func Int16s(key string, nums []int16) Field + func Int32(key string, val int32) Field + func Int32p(key string, val *int32) Field + func Int32s(key string, nums []int32) Field + func Int64(key string, val int64) Field + func Int64p(key string, val *int64) Field + func Int64s(key string, nums []int64) Field + func Int8(key string, val int8) Field + func Int8p(key string, val *int8) Field + func Int8s(key string, nums []int8) Field + func Intp(key string, val *int) Field + func Ints(key string, nums []int) Field + func NamedError(key string, err error) Field + func Namespace(key string) Field + func Object(key string, val qlogcore.ObjectMarshaler) Field + func Reflect(key string, val interface{}) Field + func Skip() Field + func Stack(key string) Field + func StackSkip(key string, skip int) Field + func String(key string, val string) Field + func Stringer(key string, val fmt.Stringer) Field + func Stringp(key string, val *string) Field + func Strings(key string, ss []string) Field + func Time(key string, val time.Time) Field + func Timep(key string, val *time.Time) Field + func Times(key string, ts []time.Time) Field + func Uint(key string, val uint) Field + func Uint16(key string, val uint16) Field + func Uint16p(key string, val *uint16) Field + func Uint16s(key string, nums []uint16) Field + func Uint32(key string, val uint32) Field + func Uint32p(key string, val *uint32) Field + func Uint32s(key string, nums []uint32) Field + func Uint64(key string, val uint64) Field + func Uint64p(key string, val *uint64) Field + func Uint64s(key string, nums []uint64) Field + func Uint8(key string, val uint8) Field + func Uint8p(key string, val *uint8) Field + func Uint8s(key string, nums []uint8) Field + func Uintp(key string, val *uint) Field + func Uintptr(key string, val uintptr) Field + func Uintptrp(key string, val *uintptr) Field + func Uintptrs(key string, us []uintptr) Field + func Uints(key string, nums []uint) Field + type LevelEnablerFunc func(qlogcore.Level) bool + func (f LevelEnablerFunc) Enabled(lvl qlogcore.Level) bool + type Logger struct + func L() *Logger + func New(core qlogcore.Core, options ...Option) *Logger + func NewDevelopment(options ...Option) (*Logger, error) + func NewExample(options ...Option) *Logger + func NewNop() *Logger + func NewProduction(options ...Option) (*Logger, error) + func (log *Logger) Check(lvl qlogcore.Level, msg string) *qlogcore.CheckedEntry + func (log *Logger) Core() qlogcore.Core + func (log *Logger) DPanic(msg string, fields ...Field) + func (log *Logger) Debug(msg string, fields ...Field) + func (log *Logger) Error(msg string, fields ...Field) + func (log *Logger) Fatal(msg string, fields ...Field) + func (log *Logger) Info(msg string, fields ...Field) + func (log *Logger) Named(s string) *Logger + func (log *Logger) Panic(msg string, fields ...Field) + func (log *Logger) Sugar() *SugaredLogger + func (log *Logger) Sync() error + func (log *Logger) Warn(msg string, fields ...Field) + func (log *Logger) With(fields ...Field) *Logger + func (log *Logger) WithOptions(opts ...Option) *Logger + type Option interface + func AddCaller() Option + func AddCallerSkip(skip int) Option + func AddStacktrace(lvl qlogcore.LevelEnabler) Option + func Development() Option + func ErrorOutput(w qlogcore.WriteSyncer) Option + func Fields(fs ...Field) Option + func Hooks(hooks ...func(qlogcore.Entry) error) Option + func IncreaseLevel(lvl qlogcore.LevelEnabler) Option + func OnFatal(action qlogcore.CheckWriteAction) Option + func WithCaller(enabled bool) Option + func WithClock(clock Clock) Option + func WrapCore(f func(qlogcore.Core) qlogcore.Core) Option + type SamplingConfig struct + Hook func(qlogcore.Entry, qlogcore.SamplingDecision) + Initial int + Thereafter int + type Sink interface + type SugaredLogger struct + func S() *SugaredLogger + func (s *SugaredLogger) DPanic(args ...interface{}) + func (s *SugaredLogger) DPanicf(template string, args ...interface{}) + func (s *SugaredLogger) DPanicw(msg string, keysAndValues ...interface{}) + func (s *SugaredLogger) Debug(args ...interface{}) + func (s *SugaredLogger) Debugf(template string, args ...interface{}) + func (s *SugaredLogger) Debugw(msg string, keysAndValues ...interface{}) + func (s *SugaredLogger) Desugar() *Logger + func (s *SugaredLogger) Error(args ...interface{}) + func (s *SugaredLogger) Errorf(template string, args ...interface{}) + func (s *SugaredLogger) Errorw(msg string, keysAndValues ...interface{}) + func (s *SugaredLogger) Fatal(args ...interface{}) + func (s *SugaredLogger) Fatalf(template string, args ...interface{}) + func (s *SugaredLogger) Fatalw(msg string, keysAndValues ...interface{}) + func (s *SugaredLogger) Info(args ...interface{}) + func (s *SugaredLogger) Infof(template string, args ...interface{}) + func (s *SugaredLogger) Infow(msg string, keysAndValues ...interface{}) + func (s *SugaredLogger) Named(name string) *SugaredLogger + func (s *SugaredLogger) Panic(args ...interface{}) + func (s *SugaredLogger) Panicf(template string, args ...interface{}) + func (s *SugaredLogger) Panicw(msg string, keysAndValues ...interface{}) + func (s *SugaredLogger) Sync() error + func (s *SugaredLogger) Warn(args ...interface{}) + func (s *SugaredLogger) Warnf(template string, args ...interface{}) + func (s *SugaredLogger) Warnw(msg string, keysAndValues ...interface{}) + func (s *SugaredLogger) With(args ...interface{}) *SugaredLogger