Skip to content

Commit

Permalink
Merge pull request #6266 from Scoppio/log-console
Browse files Browse the repository at this point in the history
feat: env var mm.profile=dev makes log print on console
  • Loading branch information
SJuliez authored Dec 14, 2024
2 parents b049c9a + b42e4df commit 9fb1cdf
Showing 1 changed file with 8 additions and 6 deletions.
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>

0 comments on commit 9fb1cdf

Please sign in to comment.