You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/06/11 21:02:45 UTC

[jira] Commented: (SLING-525) Allow more fine grained logging configuration

    [ https://issues.apache.org/jira/browse/SLING-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604309#action_12604309 ] 

Felix Meschberger commented on SLING-525:
-----------------------------------------

Implemented the basic functionality in Rev. 666782.

In addition the global configurtion with the global log level and configuration file setting, two kinds of configurations are now supported:

(1) Log Writer Configuration: Allows the definition of multiple log files. For each log file the file path, number of file generations to keep and maximum file size before creating a generation can be specified. Log files must be configured such, that logger configuration can use them for writing log information.

(2) Logger Configuration: Allows the definition of multiple logger configuration. Each logger configuration refers to a log file (by file name or configuration PID). In addition the logger defines a log level and a number of logging categories to which the logger configuration applies.

The two configuration settings are used to select whether a log message is actually written and to which file (or the console) the message is written: A logger is created with a name, which assumes an implicit hierarchy similar to the package naming hierarchy of Java. For example the logger "sample" is considered a "parent" logger of  "sample.impl".

When a logger is created, it is assigned a Logger Configuration as per the loggers name. The logger configuration assigned with a logger name most closely matching the Logger's name is applied to the logger. This configuration the defines, which file the message is written to and which level is used.

Example: Consider two Logger Configurations for "org.apache.felix" and "org.apache.felix.scr", resp. If a logger is created with the name "org.apache.felix.framework.Felix", the first logger configuration -- "org.apache.felix" -- applies . For a logger with the name "org.apache.scr.impl.Activator", the second configuration -- "org.apache.felix.scr" -- applies.

The implementation is currently working but lacks some stability. For example, if a log file configuration is removed, which is still referred to by Logger configurations, the logger configurations must be modified to fall back to the default log file.

> Allow more fine grained logging configuration
> ---------------------------------------------
>
>                 Key: SLING-525
>                 URL: https://issues.apache.org/jira/browse/SLING-525
>             Project: Sling
>          Issue Type: New Feature
>          Components: Commons Log
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>
> Currently Sling logging only allows for a global log file (file or console) with a global log level setting. For application development and issue tracking it is required to be able to have more fine grained control over the configuration:
>    * multiple log files
>    * log levels per category

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.