Author: jaz
Date: Thu May 3 10:09:23 2007 New Revision: 534934 URL: http://svn.apache.org/viewvc?view=rev&rev=534934 Log: removed log4j settings from debug.properties; added new log4j.xml configuration; updated start.java to use the new path to base and the new log4j configuration Added: ofbiz/trunk/framework/base/config/log4j.xml (with props) Modified: ofbiz/trunk/framework/base/config/debug.properties ofbiz/trunk/framework/base/src/start/org/ofbiz/base/start/Start.java Modified: ofbiz/trunk/framework/base/config/debug.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/config/debug.properties?view=diff&rev=534934&r1=534933&r2=534934 ============================================================================== --- ofbiz/trunk/framework/base/config/debug.properties (original) +++ ofbiz/trunk/framework/base/config/debug.properties Thu May 3 10:09:23 2007 @@ -32,69 +32,3 @@ print.warning=true print.error=true print.fatal=true - -# Set root logger priority and appender -log4j.rootLogger=ALL, stdout, file, css - -# Special OFBiz log4j configuration - set all top levels to true and set root to ALL -log4j.logger.NoModule=ALL -log4j.logger.org.ofbiz=ALL - -# Minerva configuration -log4j.logger.org.ofbiz.minerva=WARN - -# Shark configuration -log4j.logger.Persistence=INFO -log4j.logger.PackageEventLogger=INFO -log4j.logger.Shark=INFO -log4j.logger.org.ofbiz.shark=INFO - -# FTL/JP configuration -log4j.logger.freemarker=ERROR -log4j.logger.org.jpublish=ERROR -log4j.logger.com.anthonyeden=ERROR - -# JOTM/Carol configuration -log4j.logger.org.objectweb=INFO - -# XAPool configuration -log4j.logger.org.enhydra.jdbc=ERROR - -# Apache configuration -log4j.logger.org.apache=WARN - -#--- Console Log -- -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - -# Pattern to output the caller's file name and line number. -log4j.appender.stdout.layout.ConversionPattern=%d (%t) [%24F:%-3L:%-5p]%x %m%n -#log4j.appender.stdout.layout.ConversionPattern=%-5r (%t) [%24F:%-3L:%-5p]%x %m%n -#log4j.appender.stdout.layout.ConversionPattern=%-5r[%24F:%-3L:%c:%-5p]%x %m%n -#log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n -#log4j.appender.stdout.layout.ConversionPattern=%-8r [%t] %-5p %c %x - %m%n - -#--- File Log --- -log4j.appender.file=org.apache.log4j.RollingFileAppender -log4j.appender.file.File=runtime/logs/ofbiz.log - -log4j.appender.file.MaxFileSize=1000KB -log4j.appender.file.MaxBackupIndex=10 - -log4j.appender.file.layout=org.apache.log4j.PatternLayout -log4j.appender.file.layout.ConversionPattern=%d (%t) [%24F:%-3L:%-5p]%x %m%n - -#--- CSS Log --- -log4j.appender.css=org.apache.log4j.RollingFileAppender -log4j.appender.css.File=runtime/logs/ofbiz.html -log4j.appender.css.MaxFileSize=200KB -log4j.appender.css.MaxBackupIndex=1 -log4j.appender.css.layout=org.apache.log4j.PatternLayout -log4j.appender.css.layout.ConversionPattern=<div class=%p>%d (%t) [%24F:%-3L:%-5p]%x %m </div>%n - -#--- EXAMPLE --- -log4j.appender.A2=org.apache.log4j.ConsoleAppender -log4j.appender.A2.layout=org.apache.log4j.PatternLayout - -# Print the date in ISO 8601 format -log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n Added: ofbiz/trunk/framework/base/config/log4j.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/config/log4j.xml?view=auto&rev=534934 ============================================================================== --- ofbiz/trunk/framework/base/config/log4j.xml (added) +++ ofbiz/trunk/framework/base/config/log4j.xml Thu May 3 10:09:23 2007 @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true"> + + <!-- root logger --> + <root> + <priority value="debug"></priority> + <appender-ref ref="stdout"/> + <appender-ref ref="async"/> + </root> + + <!-- log minerva to the special log --> + <category name="org.ofbiz.minerva"> + <appender-ref ref="minerva-log"/> + </category> + + <!-- stdout appender --> + <appender name="stdout" class="org.apache.log4j.ConsoleAppender"> + <param name="threshold" value="info"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d (%t) [%24F:%-3L:%-5p]%x %m%n"/> + </layout> + </appender> + + <!-- file logging done async --> + <appender name="async" class="org.apache.log4j.AsyncAppender"> + <appender-ref ref="ofbiz-file"/> + <appender-ref ref="ofbiz-html"/> + <appender-ref ref="debug"/> + <appender-ref ref="error"/> + <!-- <appender-ref ref="email"/> --> + </appender> + + <!-- ofbiz file appender --> + <appender name="ofbiz-file" class="org.apache.log4j.RollingFileAppender"> + <param name="maxFileSize" value="1000KB" /> + <param name="maxBackupIndex" value="10" /> + <param name="File" value="runtime/logs/ofbiz.log" /> + <param name="threshold" value="info"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d (%t) [%24F:%-3L:%-5p]%x %m%n"/> + </layout> + </appender> + + <!-- ofbiz web file appender --> + <appender name="ofbiz-html" class="org.apache.log4j.RollingFileAppender"> + <param name="maxFileSize" value="200KB" /> + <param name="maxBackupIndex" value="1" /> + <param name="File" value="runtime/logs/ofbiz.html" /> + <param name="threshold" value="info"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="<div class=%p>%d (%t) [%24F:%-3L:%-5p]%x %m </div>%n"/> + </layout> + </appender> + + <!-- debug log --> + <appender name="debug" class="org.apache.log4j.FileAppender"> + <param name="File" value="runtime/logs/debug.log" /> + <param name="Append" value="false"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d (%t) [%24F:%-3L:%-5p]%x %m%n"/> + </layout> + <filter class="org.apache.log4j.varia.LevelRangeFilter"> + <param name="LevelMax" value="info"/> + <param name="LevelMin" value="trace"/> + <param name="AcceptOnMatch" value="true"/> + </filter> + </appender> + + <!-- error log --> + <appender name="error" class="org.apache.log4j.FileAppender"> + <param name="File" value="runtime/logs/error.log" /> + <param name="Append" value="false"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d (%t) [%24F:%-3L:%-5p]%x %m%n"/> + </layout> + <filter class="org.apache.log4j.varia.LevelRangeFilter"> + <param name="LevelMax" value="fatal"/> + <param name="LevelMin" value="error"/> + <param name="AcceptOnMatch" value="true"/> + </filter> + </appender> + + <!-- special minerva log --> + <appender name="minerva-log" class="org.apache.log4j.FileAppender"> + <param name="File" value="runtime/logs/minerva.log" /> + <param name="Append" value="false"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d (%t) [%24F:%-3L:%-5p]%x %m%n"/> + </layout> + </appender> + + <!-- fatal error SMTP notification --> + <appender name="email" class="org.apache.log4j.net.SMTPAppender"> + <param name="BufferSize" value="512" /> + <param name="SMTPHost" value="localhost" /> + <param name="From" value="ofbiz-error@localhost" /> + <param name="To" value="[hidden email]" /> + <param name="Subject" value="[OFBiz-Error] Application message" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d (%t) [%24F:%-3L:%-5p]%x %m%n"/> + </layout> + <filter class="org.apache.log4j.varia.LevelRangeFilter"> + <param name="LevelMin" value="fatal"/> + <param name="LevelMax" value="fatal"/> + </filter> + </appender> +</log4j:configuration> \ No newline at end of file Propchange: ofbiz/trunk/framework/base/config/log4j.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/base/config/log4j.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/framework/base/config/log4j.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/framework/base/src/start/org/ofbiz/base/start/Start.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/start/org/ofbiz/base/start/Start.java?view=diff&rev=534934&r1=534933&r2=534934 ============================================================================== --- ofbiz/trunk/framework/base/src/start/org/ofbiz/base/start/Start.java (original) +++ ofbiz/trunk/framework/base/src/start/org/ofbiz/base/start/Start.java Thu May 3 10:09:23 2007 @@ -541,7 +541,7 @@ // base jar file baseJar = System.getProperty("ofbiz.base.jar"); if (baseJar == null) { - baseJar = ofbizHome + "/" + props.getProperty("ofbiz.base.jar", "base/build/lib/ofbiz-base.jar"); + baseJar = ofbizHome + "/" + props.getProperty("ofbiz.base.jar", "framework/base/build/lib/ofbiz-base.jar"); } // tools jar @@ -569,7 +569,7 @@ // container configuration containerConfig = System.getProperty("ofbiz.container.config"); if (containerConfig == null) { - containerConfig = ofbizHome + "/" + props.getProperty("ofbiz.container.config", "base/config/ofbiz-containers.xml"); + containerConfig = ofbizHome + "/" + props.getProperty("ofbiz.container.config", "framework/base/config/ofbiz-containers.xml"); } // get the admin server info @@ -614,7 +614,7 @@ // build a default log4j configuration based on ofbizHome if (log4jConfig == null) { - log4jConfig = ofbizHome + "/base/config/debug.properties"; + log4jConfig = "log4j.xml"; } // set the log4j configuration property so we don't pick up one inside jars by mistake |
Free forum by Nabble | Edit this page |