Browse Source

logging default settings for java application files

plugin
fr3ts0n 4 years ago
parent
commit
a545d173d6
  1. 67
      awt_startup/log4j.xml
  2. 1
      awt_startup/logging.properties

67
awt_startup/log4j.xml

@ -1,67 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout" >
<param name="conversionPattern" value="%d{yyyy.MM.dd\tHH:mm:ss.SSS}\t%-5p\t%-5c\t%m%n"/>
</layout>
<!--
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="levelMax" value="Level.INFO" />
<param name="levelMin" value="Level.FATAL" />
</filter>
-->
</appender>
<appender name="logFile" class="org.apache.log4j.DailyRollingFileAppender">
<!-- Name der Log Datei -->
<param name="File" value="JObd.log" />
<!-- Jeden Tag um 0:00 Uhr alte Datei umbenennen und neue starten -->
<param name="DatePattern" value="'_'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout" >
<param name="conversionPattern" value="%d{yyyy.MM.dd\tHH:mm:ss.SSS}\t%-5p\t%-5c\t%m%n"/>
</layout>
</appender>
<!--
<logger name="com.fr3ts0n.pvs" additivity="true">
<level value="info" />
</logger>
<logger name="com.fr3ts0n.pvs.io" additivity="true">
<level value="info" />
</logger>
<logger name="data" additivity="true">
<level value="info" />
</logger>
<logger name="com.fr3ts0n.prot.kl" additivity="true">
<level value="info" />
</logger>
<logger name="com.fr3ts0n.prot.1281" additivity="false">
<level value="debug" />
</logger>
<logger name="com.fr3ts0n.prot" additivity="false">
<level value="info" />
</logger>
<logger name="com.fr3ts0n.prot.kl" additivity="false">
<level value="info" />
</logger>
<logger name="com.fr3ts0n.prot.1281" additivity="true">
<level value="debug" />
</logger>
-->
<!-- default -->
<root>
<level value="info" />
<appender-ref ref="console"/>
<appender-ref ref="logFile"/>
</root>
</log4j:configuration>

1
awt_startup/logging.properties

@ -0,0 +1 @@
java.util.logging.SimpleFormatter.format = "%1$tF\t%1$tT.%1$tL\t%4$s\t%3$s\t%5$s%n"
Loading…
Cancel
Save