Use RollingFileAppender only when log_limit_in_kbytes greater than 0 #1228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This corrects the agent logger agent config so that a RollingFileAppender is only created if the setting
log_limit_in_kbytes
is > 0. Before, if thelog_limit_in_kbytes
was 0 butlog_file_count
was > 1, a RollingFileAppender was created, but with a NoOp trigger policy, no rolling ever actually occurred.Created unit tests for these scenarios.
The docs will be clarified with the follow info:
log_daily
is true, it will use thefile_count value
, with a minimum value of 1; iflog_limit_in_kbytes
> 0, a composite trigger policy will be configured: daily roll and size based rolllog_limit_in_kbytes
> 0, a rolling file appender strategy will be configured, using the configuredlog_file_count
(minimum of 1)This is a non-breaking change, since any environment with
log_limit_in_kbytes
== 0 andlog_file_limit
> 1 will result in a regular, non-rolling file appender, which is equivalent to prior behavior.