log

package module
v0.0.0-...-a2da7cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 10 Imported by: 0

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL