Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new spring boot rolling policy properties #297

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ ECS JSON file appender logback configuration provided for import, similar to the
</encoder>
<file>${LOG_FILE}.json</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<cleanHistoryOnStart>${LOG_FILE_CLEAN_HISTORY_ON_START:-false}</cleanHistoryOnStart>
<fileNamePattern>${ROLLING_FILE_NAME_PATTERN:-${LOG_FILE}.json.%d{yyyy-MM-dd}.%i.gz}</fileNamePattern>
<maxFileSize>${LOG_FILE_MAX_SIZE:-10MB}</maxFileSize>
<maxHistory>${LOG_FILE_MAX_HISTORY:-7}</maxHistory>
<totalSizeCap>${LOG_FILE_TOTAL_SIZE_CAP:-0}</totalSizeCap>
<!-- LOGBACK_ROLLINGPOLICY_ env variables are for Spring Boot 3+, the LOG_FILE_ variables for spring boot 2 -->
<cleanHistoryOnStart>${LOG_FILE_CLEAN_HISTORY_ON_START:-${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false}}</cleanHistoryOnStart>
<fileNamePattern>${ROLLING_FILE_NAME_PATTERN:-${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.json.%d{yyyy-MM-dd}.%i.gz}}</fileNamePattern>
<maxFileSize>${LOG_FILE_MAX_SIZE:-${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB}}</maxFileSize>
<maxHistory>${LOG_FILE_MAX_HISTORY:-${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-7}}</maxHistory>
<totalSizeCap>${LOG_FILE_TOTAL_SIZE_CAP:-${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0}}</totalSizeCap>
</rollingPolicy>
</appender>
</included>
Loading