Repository: caddyserver/caddy
File: modules/logging/filewriter.go (Go)

Code before:

// FileWriter can write logs to files. By default, log files
// are rotated ("rolled") when they get large, and old log
// files get deleted, to ensure that the process does not
// exhaust disk space.
type FileWriter struct {
	// Filename is the name of the file to write.
	Filename string `json:"filename,omitempty"`

	// The file permissions mode.
	// 0600 by default.
	Mode fileMode `json:"mode,omitempty"`

	// Roll toggles log rolling or rotation, which is
	// enabled by default.
	Roll *bool `json:"roll,omitempty"`

	// When a log file reaches approximately this size,
	// it will be rotated.
	RollSizeMB int `json:"roll_size_mb,omitempty"`

	// Roll log file after some time
	RollInterval time.Duration `json:"roll_interval,omitempty`

	// Roll log file at fix minutes
	RollAtMinutes []int `json:"roll_minutes,omitempty`

	// Roll log file at fix time
	RollAt []string `json:"roll_at,omitempty`

	// Whether to compress rolled files. Default: true
	RollCompress *bool `json:"roll_gzip,omitempty"`

	// Whether to use local timestamps in rolled filenames.
	// Default: false
	RollLocalTime bool `json:"roll_local_time,omitempty"`

	// The maximum number of rolled log files to keep.
	// Default: 10
	RollKeep int `json:"roll_keep,omitempty"`

	// How many days to keep rolled log files. Default: 90
	RollKeepDays int `json:"roll_keep_days,omitempty"`

	// Rotated file will have format <logfilename>-<format>-<criterion>.log
	BackupTimeFormat string `json:"backup_time_format,omitempty"`
}

// CaddyModule returns the Caddy module information.
func (FileWriter) CaddyModule() caddy.ModuleInfo {
	return caddy.ModuleInfo{

Review comment (suggestion):
```suggestion
	RollAtMinutes []int `json:"roll_at_minutes,omitempty"`
```

Code after:

// FileWriter can write logs to files. By default, log files
// are rotated ("rolled") when they get large, and old log
// files get deleted, to ensure that the process does not
// exhaust disk space.
type FileWriter struct {
	// Filename is the name of the file to write.
	Filename string `json:"filename,omitempty"`

	// The file permissions mode.
	// 0600 by default.
	Mode fileMode `json:"mode,omitempty"`

	// Roll toggles log rolling or rotation, which is
	// enabled by default.
	Roll *bool `json:"roll,omitempty"`

	// When a log file reaches approximately this size,
	// it will be rotated.
	RollSizeMB int `json:"roll_size_mb,omitempty"`

	// Roll log file after some time
	RollInterval time.Duration `json:"roll_interval,omitempty"`

	// Roll log file at fix minutes
	// For example []int{0, 30} will roll file at xx:00 and xx:30 each hour
	// Invalid value are ignored with a warning on stderr
	// See https://github.com/DeRuina/timberjack#%EF%B8%8F-rotation-notes--warnings for caveats
	RollAtMinutes []int `json:"roll_minutes,omitempty"`

	// Roll log file at fix time
	// For example []string{"00:00", "12:00"} will roll file at 00:00 and 12:00 each day
	// Invalid value are ignored with a warning on stderr
	// See https://github.com/DeRuina/timberjack#%EF%B8%8F-rotation-notes--warnings for caveats
	RollAt []string `json:"roll_at,omitempty"`

	// Whether to compress rolled files. Default: true
	RollCompress *bool `json:"roll_gzip,omitempty"`

	// Whether to use local timestamps in rolled filenames.
	// Default: false
	RollLocalTime bool `json:"roll_local_time,omitempty"`

	// The maximum number of rolled log files to keep.
	// Default: 10
	RollKeep int `json:"roll_keep,omitempty"`

	// How many days to keep rolled log files. Default: 90
	RollKeepDays int `json:"roll_keep_days,omitempty"`

	// Rotated file will have format <logfilename>-<format>-<criterion>.log