Documentation ¶
Overview ¶
Package standardlogger provides a zap-based logging implementation with structured, leveled logging, including support for panic handling and configurable log levels through the StandardLog type and associated functions.
Index ¶
- func GetCore(l *StandardLog) zapcore.Core
- func GetLabelsAsZapFields(labels logger.Labels) []zap.Field
- func GetLabelsKeys(labels logger.Labels) []string
- func GetLoggerFieldsAsZapFields(loggerFields logger.Fields) []zap.Field
- func New(labels logger.Labels, opts ...Option) logger.Log
- type Option
- type PanicContainer
- type StandardLog
- func (l *StandardLog) Close()
- func (l *StandardLog) Error(msg string, code uint64)
- func (l *StandardLog) Errorw(msg string, code uint64, fields logger.Fields)
- func (l *StandardLog) Fatal(msg string, code uint64)
- func (l *StandardLog) Fatalw(msg string, code uint64, fields logger.Fields)
- func (l *StandardLog) Flush()
- func (l *StandardLog) Info(msg string)
- func (l *StandardLog) Infow(msg string, fields logger.Fields)
- func (l *StandardLog) Panic(msg string, code uint64)
- func (l *StandardLog) PanicLogger()
- func (l *StandardLog) Panicw(msg string, code uint64, fields logger.Fields)
- func (l *StandardLog) Warn(msg string)
- func (l *StandardLog) Warnw(msg string, fields logger.Fields)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCore ¶
func GetCore(l *StandardLog) zapcore.Core
func GetLabelsKeys ¶
Types ¶
type Option ¶
type Option func(*loggerSettings)
func WithLogLevel ¶
WithLogLevel returns Option that sets the desired log level.
type PanicContainer ¶
type PanicContainer struct { Code uint64 // contains filtered or unexported fields }
type StandardLog ¶
type StandardLog struct {
ZapLogger zapLogger
}
func (*StandardLog) Close ¶
func (l *StandardLog) Close()
func (*StandardLog) Error ¶
func (l *StandardLog) Error(msg string, code uint64)
func (*StandardLog) Errorw ¶
func (l *StandardLog) Errorw(msg string, code uint64, fields logger.Fields)
func (*StandardLog) Fatal ¶
func (l *StandardLog) Fatal(msg string, code uint64)
func (*StandardLog) Fatalw ¶
func (l *StandardLog) Fatalw(msg string, code uint64, fields logger.Fields)
func (*StandardLog) Flush ¶
func (l *StandardLog) Flush()
func (*StandardLog) Info ¶
func (l *StandardLog) Info(msg string)
func (*StandardLog) Panic ¶
func (l *StandardLog) Panic(msg string, code uint64)
func (*StandardLog) PanicLogger ¶
func (l *StandardLog) PanicLogger()
func (*StandardLog) Panicw ¶
func (l *StandardLog) Panicw(msg string, code uint64, fields logger.Fields)
func (*StandardLog) Warn ¶
func (l *StandardLog) Warn(msg string)
Click to show internal directories.
Click to hide internal directories.