[vlma-devel] commit: A more friendly layout for log files. (Adrien Grand )

git version control git at videolan.org
Sun Jul 13 12:26:48 CEST 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sun Jul 13 12:28:06 2008 +0200| [a50a89d718631c8607ad450b69e17a670a1281a8]

A more friendly layout for log files.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=a50a89d718631c8607ad450b69e17a670a1281a8
---

 vlma-distribution/src/assembly/bin.xml        |    2 +-
 vlma-distribution/src/bin/vlmad               |    2 +-
 vlma-distribution/src/bin/vlmad.bat           |    2 +-
 vlma-distribution/src/conf/log4j.properties   |   24 ++++++++++++++++++++++++
 vlma-distribution/src/conf/logging.properties |   19 -------------------
 5 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/vlma-distribution/src/assembly/bin.xml b/vlma-distribution/src/assembly/bin.xml
index 14cd27f..c80a8d1 100644
--- a/vlma-distribution/src/assembly/bin.xml
+++ b/vlma-distribution/src/assembly/bin.xml
@@ -49,7 +49,7 @@
             <outputDirectory>conf</outputDirectory>
             <includes>
                 <include>config.properties</include>
-                <include>logging.properties</include>
+                <include>log4j.properties</include>
             </includes>
         </fileSet>
         <fileSet>
diff --git a/vlma-distribution/src/bin/vlmad b/vlma-distribution/src/bin/vlmad
index 3bafe88..ac59606 100644
--- a/vlma-distribution/src/bin/vlmad
+++ b/vlma-distribution/src/bin/vlmad
@@ -77,7 +77,7 @@ VLMA_OPTS="$VLMA_OPTS\
  -Dvlma.data=$VLMA_DATA\
  -Dvlma.logs=$VLMA_LOGS\
  -Dvlma.work=$VLMA_WORK\
- -Dlog4j.configuration=file:$VLMA_CONF/logging.properties\
+ -Dlog4j.configuration=file:$VLMA_CONF/log4j.properties\
  -classpath $CLASSPATH"
 
 # Run VLMad
diff --git a/vlma-distribution/src/bin/vlmad.bat b/vlma-distribution/src/bin/vlmad.bat
index 7331117..58dbfb7 100644
--- a/vlma-distribution/src/bin/vlmad.bat
+++ b/vlma-distribution/src/bin/vlmad.bat
@@ -61,7 +61,7 @@ echo [INFO] Using VLMA_WORK: %VLMA_WORK%
 
 call bin\build_cp.cmd "%VLMA_LIBS%"
 
-set VLMA_OPTS=%VLMA_OPTS% -Dvlma.home="%VLMA_HOME%" -Dvlma.conf="%VLMA_CONF%" -Dvlma.data="%VLMA_DATA%" -Dvlma.logs="%VLMA_LOGS%" -Dvlma.work="%VLMA_WORK%" -Dlog4j.configuration="file:%VLMA_CONF%\logging.properties" -classpath %VLMA_CLASSPATH%
+set VLMA_OPTS=%VLMA_OPTS% -Dvlma.home="%VLMA_HOME%" -Dvlma.conf="%VLMA_CONF%" -Dvlma.data="%VLMA_DATA%" -Dvlma.logs="%VLMA_LOGS%" -Dvlma.work="%VLMA_WORK%" -Dlog4j.configuration="file:%VLMA_CONF%\log4j.properties" -classpath %VLMA_CLASSPATH%
 
 set OPTS=%VLMA_OPTS% %JAVA_OPTS% org.videolan.vlma.daemon.VLMad %command%
 echo [INFO] Launching %JAVA% %OPTS%
diff --git a/vlma-distribution/src/conf/log4j.properties b/vlma-distribution/src/conf/log4j.properties
new file mode 100644
index 0000000..ea1fc54
--- /dev/null
+++ b/vlma-distribution/src/conf/log4j.properties
@@ -0,0 +1,24 @@
+# VLMa log4j configuration
+
+log4j.rootLogger=INFO,errorfile,warnfile,infofile
+
+log4j.appender.errorfile=org.apache.log4j.RollingFileAppender
+log4j.appender.errorfile.layout=org.apache.log4j.PatternLayout
+log4j.appender.errorfile.layout.ConversionPattern=%d{ABSOLUTE} - %-5p - %m%n
+log4j.appender.errorfile.File=${vlma.logs}/vlmad.error.log
+log4j.appender.errorfile.MaxBackupIndex=7
+log4j.appender.errorfile.Threshold=ERROR
+
+log4j.appender.warnfile=org.apache.log4j.RollingFileAppender
+log4j.appender.warnfile.layout=org.apache.log4j.PatternLayout
+log4j.appender.warnfile.layout.ConversionPattern=%d{ABSOLUTE} - %-5p - %m%n
+log4j.appender.warnfile.File=${vlma.logs}/vlmad.warn.log
+log4j.appender.warnfile.MaxBackupIndex=7
+log4j.appender.warnfile.Threshold=WARN
+
+log4j.appender.infofile=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.infofile.layout=org.apache.log4j.PatternLayout
+log4j.appender.infofile.layout.ConversionPattern=%d{ABSOLUTE} - %-5p - %m%n
+log4j.appender.infofile.File=${vlma.logs}/vlmad.info.log
+log4j.appender.infofile.MaxBackupIndex=7
+log4j.appender.infofile.Threshold=INFO
diff --git a/vlma-distribution/src/conf/logging.properties b/vlma-distribution/src/conf/logging.properties
deleted file mode 100644
index 042f6bf..0000000
--- a/vlma-distribution/src/conf/logging.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-log4j.rootLogger=INFO,errorfile,warnfile,infofile
-
-log4j.appender.errorfile=org.apache.log4j.RollingFileAppender
-log4j.appender.errorfile.layout=org.apache.log4j.SimpleLayout
-log4j.appender.errorfile.File=${vlma.logs}/vlmad.error.log
-log4j.appender.errorfile.MaxBackupIndex=7
-log4j.appender.errorfile.Threshold=ERROR
-
-log4j.appender.errorfile=org.apache.log4j.RollingFileAppender
-log4j.appender.errorfile.layout=org.apache.log4j.SimpleLayout
-log4j.appender.errorfile.File=${vlma.logs}/vlmad.warn.log
-log4j.appender.errorfile.MaxBackupIndex=7
-log4j.appender.errorfile.Threshold=WARN
-
-log4j.appender.infofile=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.infofile.layout=org.apache.log4j.SimpleLayout
-log4j.appender.infofile.File=${vlma.logs}/vlmad.info.log
-log4j.appender.infofile.MaxBackupIndex=7
-log4j.appender.infofile.Threshold=INFO



More information about the vlma-devel mailing list