Recently the agent.logging.level was exposed via the Agent Policy so that users can modify this setting globally per policy.
There are a few more agent logging settings which would also be beneficial to expose here based on user feedback.
The current [elastic-agent.yml](https://github.com/elastic/elastic-agent/blob/30e1b9b243ec670964efe0688f5310cc87e4bff2/elastic-agent.yml#L237-L239) file here has more detail about these settings.
This request is to have the following options that are relevant to also be available as configuration options in the Agent Policy:
[ ] Logging.to_files: to address duplication of logs
# Logging to rotating files. Set logging.to_files to false to disable logging to
# files.
**agent.logging.to_files: true**
[ ] Log File Rotation parameters
# Configure log file size limit. If limit is reached, log file will be
# automatically rotated
#rotateeverybytes: 20971520 # = 20MB
Number of rotated log files to keep. Oldest files will be deleted first.
keepfiles: 7
Enable log file rotation on time intervals in addition to size-based rotation.
Intervals must be at least 1s. Values of 1m, 1h, 24h, 724h, 3024h, and 365*24h
are boundary-aligned with minutes, hours, days, weeks, months, and years as
reported by the local system clock. All other intervals are calculated from the
Unix epoch. Defaults to disabled.
interval: 0
--------
# Requirements
- the advanced section of the Agent Policy to have UI to enable these options.
- Agent to be tested with the various configuration changes applied.
Recently the
agent.logging.level
was exposed via the Agent Policy so that users can modify this setting globally per policy. There are a few more agent logging settings which would also be beneficial to expose here based on user feedback.The current
[elastic-agent.yml](https://github.com/elastic/elastic-agent/blob/30e1b9b243ec670964efe0688f5310cc87e4bff2/elastic-agent.yml#L237-L239)
file here has more detail about these settings.This request is to have the following options that are relevant to also be available as configuration options in the Agent Policy:
Number of rotated log files to keep. Oldest files will be deleted first.
keepfiles: 7
Enable log file rotation on time intervals in addition to size-based rotation.
Intervals must be at least 1s. Values of 1m, 1h, 24h, 724h, 3024h, and 365*24h
are boundary-aligned with minutes, hours, days, weeks, months, and years as
reported by the local system clock. All other intervals are calculated from the
Unix epoch. Defaults to disabled.
interval: 0