Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessLogger ¶
func AccessLogger(config *Config) gin.HandlerFunc
func AccessLoggerWithConfigFile ¶
func AccessLoggerWithConfigFile(configFile string) gin.HandlerFunc
func NewLogger ¶
func NewLogger(config *Config) *zap.SugaredLogger
func NewLoggerWithConfigFile ¶
func NewLoggerWithConfigFile(configFile string) *zap.SugaredLogger
Types ¶
type Config ¶
type Config struct { Application string `mapstructure:"log_application"` Path string `mapstructure:"log_path"` Level string `mapstructure:"log_level"` Writers string `mapstructure:"log_writers"` Format string `mapstructure:"log_format"` Development bool `mapstructure:"log_development"` Color bool `mapstructure:"log_color"` RotateMaxBackup int `mapstructure:"log_rotate_max_backup"` RotateMaxSize int `mapstructure:"log_rotate_max_size"` RotateMaxAge int `mapstructure:"log_rotate_max_age"` RotateCompress bool `mapstructure:"log_rotate_compress"` }
Click to show internal directories.
Click to hide internal directories.