12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package main
- type FrontendConfigYAML struct {
- CommonConfig CommonConfigYAML `yaml:"common"`
- LogConfig LogConfigYAML `yaml:"log"`
- }
- type CommonConfigYAML struct {
- IsDebugModeOn bool `yaml:"debug"`
- RedirectWhen404 bool `yaml:"redirect_when_404"`
- RedirectURL string `yaml:"redirect_url"`
- IsBackendProxyEnable bool `yaml:"backend_proxy_enable"`
- }
- type LogConfigYAML struct {
- AccessLogEnable bool `yaml:"access_log_enable"`
- RollingLogConfig RollingLoggerConfigYAML `yaml:"rolling_log_config"`
- AccessLoggerDetailConfig AccessLoggerConfigYAML `yaml:"access_log_config"`
- ErrorLoggerDetailConfig ErrorLoggerConfigYAML `yaml:"error_log_config"`
- }
- type RollingLoggerConfigYAML struct {
- ErrLogCfg LumberjackLoggerYAML `yaml:"error_log"`
- AccessLogCfg LumberjackLoggerYAML `yaml:"access_log"`
- }
- type LumberjackLoggerYAML struct {
- FileName string `yaml:"file"`
- MaxSize int `yaml:"max_size"`
- MaxAge int `yaml:"max_age"`
- MaxBackups int `yaml:"max_backups"`
- UseLocalTime bool `yaml:"use_local_time"`
- Compress bool `yaml:"compress_history"`
- }
- type AccessLoggerConfigYAML struct {
- OutputLevel string `yaml:"output_level"`
- SuccessLevel string `yaml:"success_level"`
- NotFoundLevel string `yaml:"not_found_level"`
- ForbiddenLevel string `yaml:"forbidden_level"`
- GatewayErrorLevel string `yaml:"gateway_error_level"`
- InternalErrorLevel string `yaml:"internal_error_level"`
- OtherStatusLevel string `yaml:"other_status_level"`
- LogFormat string `yaml:"log_format"`
- UseUTC bool `yame:"use_utc"`
- }
- type ErrorLoggerConfigYAML struct {
- OutputLevel string `yaml:"output_level"`
- LogFormat string `yaml:"log_format"`
- UseUTC bool `yame:"use_utc"`
- }
|