Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvDebug = "debug" EnvStaging = "staging" EnvProduction = "production" FrameworkGin = "gin" FrameworkEcho = "echo" FrameworkFiber = "fiber" )
View Source
const ( ConsoleEncoding = "console" JsonEncoding = "json" )
View Source
const ( EncoderLevelLowercase = "lowercase" EncoderLevelLowercaseColor = "lowercase_color" EncoderLevelCapital = "capital" EncoderLevelCapitalColor = "capital_color" EncoderTimeEpoch = "epoch" EncoderTimeEpochMillis = "epoch_millis" EncoderTimeEpochNanos = "epoch_nanos" EncoderTimeISO8601 = "iso8601" EncoderTimeRFC3339 = "rfc3339" EncoderTimeRFC3339Nano = "rfc3339_nano" )
Variables ¶
View Source
var ( ListOfLevel = []interface{}{ zapcore.DebugLevel.String(), zapcore.InfoLevel.String(), zapcore.WarnLevel.String(), zapcore.ErrorLevel.String(), zapcore.DPanicLevel.String(), zapcore.PanicLevel.String(), zapcore.FatalLevel.String(), } ListOfEncoding = []interface{}{ ConsoleEncoding, JsonEncoding, } )
View Source
var ( ListOfEncoderLevel = []interface{}{ EncoderLevelLowercase, EncoderLevelLowercaseColor, EncoderLevelCapital, EncoderLevelCapitalColor, } ListOfEncoderTime = []interface{}{ EncoderTimeEpoch, EncoderTimeEpochMillis, EncoderTimeEpochNanos, EncoderTimeISO8601, EncoderTimeRFC3339, EncoderTimeRFC3339Nano, } )
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct { Level string `json:"level"` Encoding string `json:"encoding,omitempty"` InitialFields map[string]interface{} `json:"initial_fields,omitempty"` OutputPaths []string `json:"output_paths,omitempty"` ErrorOutputPaths []string `json:"error_output_paths,omitempty"` Encoder *LoggerEncoder `json:"encoder,omitempty"` RequestLogOn bool `json:"request_log_on"` }
type LoggerEncoder ¶
type LoggerEncoder struct { EncodeLevel string `json:"encode_level"` EncodeTime string `json:"encode_time"` }
func (LoggerEncoder) Validate ¶
func (l LoggerEncoder) Validate() error
Click to show internal directories.
Click to hide internal directories.