Allow configuring log levels using system properties. (#5024)
Defaults are: -Dforge.logging.mojang.level=info (note that setting this to debug or trace will enable extra debug behavior which may slow things down or detect issues and crash) -Dforge.logging.console.level=info -Dforge.logging.file.level=info -Dforge.logging.debugFile.level=trace
This commit is contained in:
parent
f999e87f17
commit
ab228832f2
2 changed files with 12 additions and 12 deletions
|
@ -37,16 +37,16 @@
|
|||
</Appenders>
|
||||
<Loggers>
|
||||
<!-- make sure mojang's logging is set to 'info' so that their LOGGER.isDebugEnabled() behavior isn't active -->
|
||||
<Logger level="info" name="com.mojang"/>
|
||||
<Logger level="info" name="net.minecraft"/>
|
||||
<Logger level="${sys:forge.logging.mojang.level:-info}" name="com.mojang"/>
|
||||
<Logger level="${sys:forge.logging.mojang.level:-info}" name="net.minecraft"/>
|
||||
<Root level="all">
|
||||
<filters>
|
||||
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
</filters>
|
||||
<AppenderRef ref="SysOut" level="info"/>
|
||||
<AppenderRef ref="ServerGuiConsole" level="info"/>
|
||||
<AppenderRef ref="File" level="info"/>
|
||||
<AppenderRef ref="DebugFile"/>
|
||||
<AppenderRef ref="SysOut" level="${sys:forge.logging.console.level:-info}"/>
|
||||
<AppenderRef ref="ServerGuiConsole" level="${sys:forge.logging.console.level:-info}"/>
|
||||
<AppenderRef ref="File" level="${sys:forge.logging.file.level:-info}"/>
|
||||
<AppenderRef ref="DebugFile" level="${sys:forge.logging.debugFile.level:-trace}"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
|
@ -37,16 +37,16 @@
|
|||
</Appenders>
|
||||
<Loggers>
|
||||
<!-- make sure mojang's logging is set to 'info' so that their LOGGER.isDebugEnabled() behavior isn't active -->
|
||||
<Logger level="info" name="com.mojang"/>
|
||||
<Logger level="info" name="net.minecraft"/>
|
||||
<Logger level="${sys:forge.logging.mojang.level:-info}" name="com.mojang"/>
|
||||
<Logger level="${sys:forge.logging.mojang.level:-info}" name="net.minecraft"/>
|
||||
<Root level="all">
|
||||
<filters>
|
||||
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
</filters>
|
||||
<AppenderRef ref="Console" level="info"/>
|
||||
<AppenderRef ref="ServerGuiConsole" level="info"/>
|
||||
<AppenderRef ref="File" level="info"/>
|
||||
<AppenderRef ref="DebugFile"/>
|
||||
<AppenderRef ref="Console" level="${sys:forge.logging.console.level:-info}"/>
|
||||
<AppenderRef ref="ServerGuiConsole" level="${sys:forge.logging.console.level:-info}"/>
|
||||
<AppenderRef ref="File" level="${sys:forge.logging.file.level:-info}"/>
|
||||
<AppenderRef ref="DebugFile" level="${sys:forge.logging.debugFile.level:-trace}"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
Loading…
Reference in a new issue