You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sc...@geronimo.apache.org on 2004/12/29 23:29:44 UTC

[Apache Geronimo Wiki] Updated: Logging

   Date: 2004-12-29T14:29:44
   Editor: TobyCabot
   Wiki: Apache Geronimo Wiki
   Page: Logging
   URL: http://wiki.apache.org/geronimo/Logging

   added a note about changing the default config files

Change Log:

------------------------------------------------------------------------------
@@ -6,3 +6,16 @@
  * `var/log/server-log4j.properties`
 
 Most likely you'll want to modify the server's configuration which is `server-log4j.properties`.  It contains a couple of examples, but for complex changes you'll probably want to learn more about log4j at http://logging.apache.org/log4j/docs/.
+
+If you prefer XML, or want Geronimo to read its log configuration files from a different place then you can hack `modules/assembly/src/plan/system-plan.xml` and rebuild Geronimo.  Look for the gbean element whose name attribute value is "geronimo.system:role=Logger".  For example:
+
+ {{{
+<!-- Logging service -->
+<gbean name="geronimo.system:role=Logger" class="org.apache.geronimo.system.logging.log4j.Log4jService">
+    <attribute name="configurationFile">/etc/geronimo/log4j.xml</attribute>
+    <attribute name="refreshPeriod">60</attribute>
+    <reference name="ServerInfo">geronimo.system:role=ServerInfo</reference>
+</gbean>
+}}}
+
+This will use `/etc/geronimo/log4j.xml` instead of the default.