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

feat: env var mm.profile=dev makes log print on console #6266

Merged
merged 1 commit into from
Dec 14, 2024
Merged
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
14 changes: 8 additions & 6 deletions megamek/mmconf/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</Properties>

<Appenders>
<Console name="Console" target="SYSTEM_OUT" follow="true">
<Console name="dev">
<PatternLayout pattern="${layout}" />
</Console>
<File name="MegaMekLog" fileName="logs/megamek.log" append="false">
Expand All @@ -17,28 +17,30 @@
<File name="MekHQLog" fileName="logs/mekhq.log" append="false">
<PatternLayout pattern="${layout}" />
</File>
<Null name="null" />
</Appenders>

<Loggers>
<Logger name="megamek.client.bot" level="error" additivity="false">
<AppenderRef ref="MegaMekLog" />
<AppenderRef ref="Console" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Logger>
<Logger name="megamek" level="info" additivity="false">
<AppenderRef ref="MegaMekLog" />
<AppenderRef ref="Console" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Logger>
<Logger name="megameklab" level="info" additivity="false">
<AppenderRef ref="MegaMekLabLog" />
<AppenderRef ref="Console" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Logger>
<Logger name="mekhq" level="info" additivity="false">
<AppenderRef ref="MekHQLog" />
<AppenderRef ref="Console" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Logger>

<Root level="info">
<AppenderRef ref="Console" />
<AppenderRef ref="MegaMekLog" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Root>
</Loggers>
</Configuration>
Loading