Title: [979] trunk/assembly/src/release/bin: Fixed SM-184 (Log4J setup) and SM-222 (derby.system.home variable).
- Revision
- 979
- Author
- bsnyder
- Date
- 2005-11-30 17:50:55 -0500 (Wed, 30 Nov 2005)
Log Message
Fixed SM-184 (Log4J setup) and SM-222 (derby.system.home variable).
Modified Paths
Added Paths
Diff
Modified: trunk/assembly/src/release/bin/servicemix (978 => 979)
--- trunk/assembly/src/release/bin/servicemix 2005-11-30 22:22:02 UTC (rev 978)
+++ trunk/assembly/src/release/bin/servicemix 2005-11-30 22:50:55 UTC (rev 979)
@@ -125,10 +125,9 @@
}
setupDefaults() {
- ##
- ## FIXME: The Derby options here should be fixed to use something other than ../*
- ##
- DEFAULT_JAVA_OPTS="-server -Xmx512M -Dderby.system.home=../var -Dderby.storage.fileSyncTransactionLog=true -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
+ DEFAULT_JAVA_OPTS="-server -Xmx512M -Dderby.system.home=$SERVICEMIX_HOME/var -Dderby.storage.fileSyncTransactionLog=true"
+ # Add the conf directory so it picks up the Log4J config
+ CLASSPATH="$CLASSPATH:$SERVICEMIX_HOME/conf"
DEFAULT_JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
##
@@ -140,7 +139,7 @@
setupClassworlds() {
# Setup the classpath
- CLASSPATH="$SERVICEMIX_HOME/lib/classworlds-1.0.1.jar"
+ CLASSPATH="$CLASSPATH:$SERVICEMIX_HOME/lib/classworlds-1.0.1.jar"
# Setup Classworlds options
CLASSWORLDS_CONF="$SERVICEMIX_HOME/conf/servicemix.conf"
Modified: trunk/assembly/src/release/bin/servicemix.bat (978 => 979)
--- trunk/assembly/src/release/bin/servicemix.bat 2005-11-30 22:22:02 UTC (rev 978)
+++ trunk/assembly/src/release/bin/servicemix.bat 2005-11-30 22:50:55 UTC (rev 979)
@@ -22,10 +22,8 @@
rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-rem
-rem FIXME: The Derby options here should be fixed to use something other than ../*
-rem
-set DEFAULT_JAVA_OPTS=-server -Xmx512M -Dderby.system.home="..\var" -Dderby.storage.fileSyncTransactionLog=true -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+set DEFAULT_JAVA_OPTS=-server -Xmx512M -Dderby.system.home="%SERVICEMIX_HOME%\var" -Dderby.storage.fileSyncTransactionLog=true
+set CLASSPATH="%CLASSPATH%;%SERVICEMIX_HOME%\conf"
set DEFAULT_JAVA_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
rem Setup Servicemix Home
@@ -73,7 +71,7 @@
:SERVICEMIX_PROFILER_END
rem Setup the classpath
-set CLASSPATH=%SERVICEMIX_HOME%\lib\classworlds-1.0.1.jar
+set CLASSPATH="%CLASSPATH%;%SERVICEMIX_HOME%\lib\classworlds-1.0.1.jar"
rem Setup boot options
set CLASSWORLDS_CONF=%SERVICEMIX_HOME%\conf\servicemix.conf
Added: trunk/assembly/src/release/conf/log4j.xml (978 => 979)
--- trunk/assembly/src/release/conf/log4j.xml 2005-11-30 22:22:02 UTC (rev 978)
+++ trunk/assembly/src/release/conf/log4j.xml 2005-11-30 22:50:55 UTC (rev 979)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%p - %C{1}.%M(%L) | %m%n"/>
+ </layout>
+ </appender>
+
+ <appender name="FILE" class="org.apache.log4j.FileAppender">
+ <param name="File" value="outage.log"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%p - %C{1}.%M(%L) | %m%n"/>
+ </layout>
+ </appender>
+
+ <logger name="org.apache">
+ <level value="WARN"/>
+ </logger>
+
+ <logger name="org.springframework">
+ <level value="WARN"/>
+ </logger>
+
+ <logger name="org.servicemix">
+ <level value="DEBUG"/>
+ </logger>
+
+ <root>
+ <level value="INFO"/>
+ <appender-ref ref="CONSOLE"/>
+ <!--appender-ref ref="FILE"/-->
+ </root>
+
+</log4j:configuration>
+<!--
+
+Log4J Configuration Quick Reference:
+====================================
+
+Priority order is DEBUG < INFO < WARN < ERROR < FATAL
+
+PatternLayout conversion characters:
+
+%c Category of the logging event
+%C Fully qualified class name of the caller
+%d Date of the logging event (example: %d{HH:mm:ss,SSS} )
+%F File name where the logging request was issued (caution: extremely slow)
+%l Location information of the caller (caution: extremely slow)
+%L Line number from where the logging request was issued (caution: extremely slow)
+%m Application-supplied message
+%M Method name from where the logging request was issued (caution: extremely slow)
+%n Line separator
+%p Priority of the logging event
+%r Number of milliseconds since the start of the application
+%t Name of the thread that generated the logging event
+%x Nested diagnotic context associated with the thread
+%% A single percent sign
+
+Format modifiers examples:
+
+%20c Left pad with spaces if category is less than 20 characters long
+%-20c Right pad with spaces if category is less than 20 characters long
+%.30c Truncate from the beginning if category is more than 30 chars long
+%20.30c Left pad 20 chars + truncate from beginning if more than 30 chars
+%-20.30c Right pad 20 chars + truncate from beginning if more than 30 chars
+
+Examples: "%r [%t] %-5p %c %x - %m\n"
+"%-6r [%15.15t] %-5p %30.30c %x - %m\n"
+
+-->