Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { // Key for a given field Key string // Type of a given field Type FieldType // Value of the given field Value interface{} // optmizations for string & int Integer int64 String string }
Field defines a standard Key-Value pair used to populate the value for the logger
type Logger ¶
type Logger interface { // Should also implement default kit.log.Logger interface kit_log.Logger // Leveled Logging Info(string, ...Field) Warn(string, ...Field) Error(string, ...Field) Panic(string, ...Field) Fatal(string, ...Field) Debug(string, ...Field) Infof(string, ...interface{}) Errorf(string, ...interface{}) Debugf(string, ...interface{}) // Flush the logs Flush() error // Default Fields With(...Field) Logger }
Logger defines standard set of functions supported by logger and used across the Base Package
func NewZapLogger ¶
func NewZapLogger( options ...ZapLoggerOption, ) (Logger, error)
NewZapLogger returns a default implementaiton of log.Logger interface using uber/zap as core layer
type ZapLoggerOption ¶
type ZapLoggerOption func(*zapLogger)
func ZapWithAppendedOutput ¶
func ZapWithAppendedOutput(outputs []string) ZapLoggerOption
ZapWithAppendedOutput is option to add additional output to list of existing output destination
func ZapWithEncoding ¶
func ZapWithEncoding(encoding string) ZapLoggerOption
ZapWithEncoding is option to set encoding for zap based logger
func ZapWithLevel ¶
func ZapWithLevel(level string) ZapLoggerOption
ZapWithLevel is option to set level for Zap Based Logger
func ZapWithOutput ¶
func ZapWithOutput(outputs []string) ZapLoggerOption
ZapWithOutput is option to set output paths for zap based logger
Click to show internal directories.
Click to hide internal directories.