jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "ApacheSling/SlingLogging" by FelixMeschberger
Date Mon, 09 Jul 2007 12:56:46 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The following page has been changed by FelixMeschberger:
http://wiki.apache.org/jackrabbit/ApacheSling/SlingLogging

New page:
= Logging =

== Introduction ==

Logging in Sling is supported by the {{{org.apache.sling.log}}} bundle, which is one of the
first bundles installed and started by the Sling Launcher. The {{{org.apache.sling.log}}}
bundle has the following tasks:

   * Implements the OSGi Log Service Specification and registers the {{{LogService}}} and
{{{LogReader}}} services
   * Exports three logging APIs:
      * [http://jakarta.apache.org/commons/logging Apache Commons Logging]
      * [http://www.slf4j.org Simple Logging Facade for Java (SLF4J)]
      * [http://logging.apache.org/log4j/ Log4J]
   * Configures logging through Log4J


== Initial Configuration ==

The {{{org.apache.sling.log}}} bundle gets the initial configuration from the following {{{BundleContext}}}
properties:


|| '''Property''' || '''Default''' || '''Description''' ||
|| {{{org.apache.sling.log.intialize}}} || {{{true}}} || Initial configuration property specifying
whether LOG4J should be initialized here or not. If this property is missing or set to {{{true}}},
this class will reset and configure LOG4J. Otherwise, LOG4J is neither reset nor configured
by this class. This property may be used to prevent resetting LOG4J which might be configured
by a container and reused by the Framework. Setting this property to anything but {{{true}}}
causes the other properties to be ignored. |
|| {{{org.apache.sling.log.level}}} || {{{WARN}}} || Sets the initial logging level of the
root logger. This may be any of the defined logging levels, which are by default {{{DEBUG}}},
{{{INFO}}}, {{{WARN}}}, {{{ERROR}}} and {{{FATAL}}}. ||
|| {{{org.apache.sling.log.file}}} || undefined || Sets the log file to which log messages
are written. If this property is empty or missing, log messages are written to {{{System.out}}}.
||
|| {{{org.apache.sling.log.pattern}}} || {{{%d{dd.MM.yyyy HH:mm:ss} !*%-5p* %c{1}: %m%n}}}
|| The logging pattern to be set for the {{{PatternLayout}}} of root logger appender. ||
|| {{{org.apache.sling.log.url}}} || undefined || If this property is set to an URL pointing
to an existing configuration file, {{{level}}}, {{{file}}} and {{{pattern}}} properties are
ignored. ||


== User Configuration ==

User Configuration after initial configuration is provided by the Configuration Admin Service.
To this avail a {{{org.osgi.services.cm.ManagedService}}} is registered under the PID {{{org.apache.sling.log.service}}}
which may receive configuration. Configuration through the Configuration Admin Service is
still under development. Hence this section cannot be completed as of now.

Mime
View raw message