Skip to content

Commit

Permalink
feat(config): add setting to specify max log file size before automat…
Browse files Browse the repository at this point in the history
…ic rotation
  • Loading branch information
jeamon committed Nov 13, 2023
1 parent bbf188d commit 81debe0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Config struct {
IsProduction bool `yaml:"is_production" envconfig:"DRAP_IS_PRODUCTION"`
LogLevel zapcore.Level `yaml:"log_level" envconfig:"DRAP_LOG_LEVEL"`
LogFolder string `yaml:"log_folder" envconfig:"DRAP_LOG_FOLDER"`
LogMaxSize int `yaml:"log_max_size" envconfig:"DRAP_LOG_MAX_SIZE"`
ProfilerEndpointsEnable bool `yaml:"profiler_endpoints_enable" envconfig:"DRAP_PROFILER_ENDPOINTS_ENABLE"`
OpsEndpointsEnable bool `yaml:"ops_endpoints_enable" envconfig:"DRAP_OPS_ENDPOINTS_ENABLE"`
Server ServerConfig `yaml:"server"`
Expand Down
1 change: 1 addition & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
is_production: true
log_level: "info"
log_folder: "logs/"
log_max_size: 250 # 250 MB

# Could be manually set or envs variables
# or auto detected with build flags.
Expand Down

0 comments on commit 81debe0

Please sign in to comment.