Documentation ¶
Index ¶
- func GetCustomCallerEncoder(caller zapcore.EntryCaller, enc zapcore.PrimitiveArrayEncoder)
- func GetCustomTimeEncoder(prefix string) zapcore.TimeEncoder
- func GetEncodeLevel(c *zapcore.EncoderConfig, level string)
- func GetEncoderConfig(options ZapOptions) (config zapcore.EncoderConfig)
- type Option
- type PGSQLOptions
- type Singleton
- type ViperOptions
- type ZapOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCustomCallerEncoder ¶ added in v1.0.5
func GetCustomCallerEncoder(caller zapcore.EntryCaller, enc zapcore.PrimitiveArrayEncoder)
func GetCustomTimeEncoder ¶ added in v1.0.5
func GetCustomTimeEncoder(prefix string) zapcore.TimeEncoder
func GetEncodeLevel ¶ added in v1.0.5
func GetEncodeLevel(c *zapcore.EncoderConfig, level string)
Set logger encode level based on config
func GetEncoderConfig ¶ added in v1.0.5
func GetEncoderConfig(options ZapOptions) (config zapcore.EncoderConfig)
Types ¶
type Option ¶ added in v1.0.1
func WithPGSQL ¶ added in v1.0.4
func WithPGSQL(options PGSQLOptions) Option
func WithRedisClient ¶ added in v1.0.1
func WithRedisClient(options *redis.Options) Option
func WithViper ¶ added in v1.0.3
func WithViper(options ViperOptions) Option
func WithZapLogger ¶ added in v1.0.5
func WithZapLogger(options ZapOptions) Option
type PGSQLOptions ¶ added in v1.0.4
type Singleton ¶ added in v1.0.1
type ViperOptions ¶ added in v1.0.3
type ViperOptions struct { Path string // path to look for the config file in, absolute path start with / and relative path start with . FileName string // name of config file (without extension) FileType string // REQUIRED if the config file does not have the extension in the name EnvName string // Env to read from the config file Target any }
type ZapOptions ¶ added in v1.0.5
type ZapOptions struct { LogLevel int // -1-debug, 0-info, 1-warn, 2-error, 3-DPanic, 4-Panic, 5-Fatal Development bool // development mode DisableStacktrace bool `default:"true"` // DisableStacktrace completely disables automatic stacktrace capturing. By default, stacktraces are captured for WarnLevel and above logs in development and ErrorLevel and above in production. EncodingFormat string `default:"console"` // json or console Prefix string EncodeLevel string ServiceName string OutputPath []string }
Click to show internal directories.
Click to hide internal directories.