Using ${jetty.logging.dir} consistently
This commit is contained in:
parent
54db1f48db
commit
15d00767a5
|
@ -14,7 +14,7 @@ handlers = java.util.logging.FileHandler
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
# default file output is in user's home directory.
|
# default file output is in user's home directory.
|
||||||
java.util.logging.FileHandler.pattern = logs/jetty%u.log
|
java.util.logging.FileHandler.pattern = ${jetty.logging.dir}/jetty%u.log
|
||||||
java.util.logging.FileHandler.limit = 50000
|
java.util.logging.FileHandler.limit = 50000
|
||||||
java.util.logging.FileHandler.count = 1
|
java.util.logging.FileHandler.count = 1
|
||||||
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
|
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
|
|
||||||
log4j.rootLogger=INFO, file
|
|
||||||
#log4j.rootLogger=INFO, stderr
|
|
||||||
|
|
||||||
log4j.appender.stderr.Target=System.err
|
|
||||||
log4j.appender.stderr=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
|
|
||||||
|
|
||||||
# Direct log messages to a log file
|
|
||||||
log4j.appender.file=org.apache.log4j.RollingFileAppender
|
|
||||||
log4j.appender.file.File=${jetty.base}/logs/jetty.log
|
|
||||||
log4j.appender.file.MaxFileSize=10MB
|
|
||||||
log4j.appender.file.MaxBackupIndex=10
|
|
||||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||||
|
|
||||||
|
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||||
|
<appender name="RollingFile" class="org.apache.log4j.RollingFileAppender">
|
||||||
|
<param name="File" value="${jetty.logging.dir}/jetty.log" />
|
||||||
|
<param name="MaxFileSize" value="100MB" />
|
||||||
|
<param name="MaxBackupIndex" value="10" />
|
||||||
|
<layout class="org.apache.log4j.PatternLayout">
|
||||||
|
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n"/>
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<priority value ="info" />
|
||||||
|
<appender-ref ref="RollingFile" />
|
||||||
|
</root>
|
||||||
|
</log4j:configuration>
|
|
@ -1,15 +1,16 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Configuration status="warn" name="Jetty" >
|
<Configuration status="warn" name="Jetty" >
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<RollingFile name="RollingFile" fileName="logs/jetty.log" filePattern="logs/jetty-%d{MM-dd-yyyy}.log.gz" ignoreExceptions="false">
|
<RollingFile name="RollingFile"
|
||||||
|
fileName="${jetty.logging.dir}/jetty.log"
|
||||||
|
filePattern="${jetty.logging.dir}/jetty-%d{MM-dd-yyyy}.log.gz"
|
||||||
|
ignoreExceptions="false">
|
||||||
<PatternLayout>
|
<PatternLayout>
|
||||||
<Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
|
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n</Pattern>
|
||||||
</PatternLayout>
|
</PatternLayout>
|
||||||
<TimeBasedTriggeringPolicy />
|
<SizeBasedTriggeringPolicy size="10MB"/>
|
||||||
|
<DefaultRolloverStrategy max="10"/>
|
||||||
</RollingFile>
|
</RollingFile>
|
||||||
<Console name="Console" target="SYSTEM_ERR">
|
|
||||||
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"/>
|
|
||||||
</Console>
|
|
||||||
</Appenders>
|
</Appenders>
|
||||||
<Loggers>
|
<Loggers>
|
||||||
<Root level="info">
|
<Root level="info">
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/>
|
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/>
|
||||||
|
|
||||||
<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>logs/jetty.log</file>
|
<file>${jetty.logging.dir}/jetty.log</file>
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
<!-- rollover daily -->
|
<!-- rollover daily -->
|
||||||
<fileNamePattern>logs/jetty-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
<fileNamePattern>logs/jetty-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||||
<maxFileSize>10MB</maxFileSize>
|
<maxFileSize>100MB</maxFileSize>
|
||||||
<maxHistory>5</maxHistory>
|
<maxHistory>10</maxHistory>
|
||||||
<totalSizeCap>2GB</totalSizeCap>
|
<totalSizeCap>2GB</totalSizeCap>
|
||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
<encoder>
|
<encoder>
|
||||||
|
@ -15,15 +15,8 @@
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<root level="INFO">
|
<root level="INFO">
|
||||||
<appender-ref ref="ROLLING" />
|
<appender-ref ref="ROLLING" />
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue