You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by gm...@apache.org on 2014/06/22 07:48:41 UTC

svn commit: r1604536 - in /roller/trunk/app/src: main/resources/log4j.properties main/resources/org/apache/roller/weblogger/config/roller.properties test/resources/roller-custom.properties

Author: gmazza
Date: Sun Jun 22 05:48:41 2014
New Revision: 1604536

URL: http://svn.apache.org/r1604536
Log:
Switched to console logger for default roller-startup logger so it will work OOTB on all installations, added comments on how to switch to a log file if desired.

Modified:
    roller/trunk/app/src/main/resources/log4j.properties
    roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties
    roller/trunk/app/src/test/resources/roller-custom.properties

Modified: roller/trunk/app/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/log4j.properties?rev=1604536&r1=1604535&r2=1604536&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/log4j.properties (original)
+++ roller/trunk/app/src/main/resources/log4j.properties Sun Jun 22 05:48:41 2014
@@ -15,17 +15,25 @@
 # directory of this distribution.
 
 #
-# *** DO NOT EDIT THIS FILE ***
-#
 # This is a bare bones Log4j setup that is present to catch any unexpected 
-# errors that occur before Roller is able to init the full logging sytem.
+# errors that occur before Roller is able to init the logging system defined
+# in Roller's built-in properties file and customized (e.g., logfile location
+# specified) via your roller-custom.properties override file.
+# See the Roller install guide for more details on the standard logfile
+# configuration.
 #
-# The full Log4j setup is in Roller's built-in properties file and you should
-# customize it via your roller-custom.properties override file.
+# This configuration uses ConsoleAppender by default so it will work on
+# all installations.  If using Tomcat on *nix systems, or running Tomcat
+# as a Windows service, Console appender will write to the Tomcat
+# logs/catalina.out file.  See http://stackoverflow.com/a/7752389
+#
+# Otherwise, you may wish to customize below by specifying a log file
+# to write to.  However, such a file will usually remain empty as Roller's
+# standard logging is activated quite early in the startup process.
 #
-
 log4j.rootLogger=ERROR, roller-startup
-log4j.appender.roller-startup=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.roller-startup.File=${catalina.base}/logs/roller-startup.log
+log4j.appender.roller-startup=org.apache.log4j.ConsoleAppender
+#log4j.appender.roller-startup=org.apache.log4j.DailyRollingFileAppender
+#log4j.appender.roller-startup.File=/path/to/a/roller-startup.log
 log4j.appender.roller-startup.layout=org.apache.log4j.PatternLayout
 log4j.appender.roller-startup.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %C{1}:%M - %m%n

Modified: roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties?rev=1604536&r1=1604535&r2=1604536&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties (original)
+++ roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties Sun Jun 22 05:48:41 2014
@@ -576,7 +576,7 @@ newweblog.editor=editor-text.jsp
 log4j.rootLogger=ERROR, roller
 
 log4j.appender.roller=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.roller.File=${catalina.base}/logs/roller.log
+log4j.appender.roller.File=${env.CATALINA_HOME}/logs/roller.log
 log4j.appender.roller.layout=org.apache.log4j.PatternLayout
 log4j.appender.roller.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %C{1}:%M - %m%n
 

Modified: roller/trunk/app/src/test/resources/roller-custom.properties
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/test/resources/roller-custom.properties?rev=1604536&r1=1604535&r2=1604536&view=diff
==============================================================================
--- roller/trunk/app/src/test/resources/roller-custom.properties (original)
+++ roller/trunk/app/src/test/resources/roller-custom.properties Sun Jun 22 05:48:41 2014
@@ -45,7 +45,7 @@ tasks.TestTask.interval=1800
 tasks.TestTask.leaseTime=300
 
 # logging
-log4j.rootCategory=INFO, roller
+log4j.rootLogger=INFO, roller
 log4j.appender.roller.File=${project.build.directory}/roller.log
 log4j.category.org.apache.roller=INFO
 log4j.category.net.java.roller=ERROR