Skip to content

Extract log file max size to a property to enable override #1

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

Open
wants to merge 1 commit into
base: master
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
3 changes: 2 additions & 1 deletion k2-core/src/main/resources/com/k2/core/logback/base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</contextListener>

<property name="LOG_FILE" value="${LOG_FILE:-target/log/test.log}"/>
<property name="LOG_FILE_MAX_SIZE" value="10MB"/>

<!-- Adds some color to the logging output. Used in the console appender
pattern. -->
Expand Down Expand Up @@ -35,7 +36,7 @@
</rollingPolicy>
<triggeringPolicy
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>10MB</MaxFileSize>
<MaxFileSize>${LOG_FILE_MAX_SIZE}</MaxFileSize>
</triggeringPolicy>
</appender>

Expand Down