From commits-return-4267-apmail-jackrabbit-commits-archive=jackrabbit.apache.org@jackrabbit.apache.org Mon Jul 09 12:57:09 2007 Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 98348 invoked from network); 9 Jul 2007 12:57:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2007 12:57:08 -0000 Received: (qmail 11276 invoked by uid 500); 9 Jul 2007 12:57:11 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 11233 invoked by uid 500); 9 Jul 2007 12:57:10 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 11223 invoked by uid 99); 9 Jul 2007 12:57:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2007 05:57:10 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2007 05:57:06 -0700 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 90CEE59A07 for ; Mon, 9 Jul 2007 12:56:46 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: commits@jackrabbit.apache.org Date: Mon, 09 Jul 2007 12:56:46 -0000 Message-ID: <20070709125646.9547.41662@eos.apache.org> Subject: [Jackrabbit Wiki] Update of "ApacheSling/SlingLogging" by FelixMeschberger X-Virus-Checked: Checked by ClamAV on apache.org 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.