[ 
https://issues.apache.org/jira/browse/SLING-384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger closed SLING-384.
-----------------------------------

    Resolution: Fixed

Replaced logback by our own simple SLF4J implementation in Rev. 648644.

The size of the bundle is drammatically reduced. Some overhead is removed from 
the logging tool, so it might well be that logging performance is even better 
(can probably still be enhanced....)


The external configuration is still the same: We have rolling file support with 
configuration of log file path, number of files to keep and maximum file size.

Also the log message pattern is still available but different: It is now a 
java.util.MessageFormat pattern taking up to five arguments as follows:

    {0} The timestamp of type java.util.Date
    {1} the log marker (generally null, not used by Sling actually)
    {2} the name of the current thread
    {3} the name of the logger
    {4} the debug level
    {5} the actual debug message

The default pattern is changed to :

    {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* [{2}] {3} {5}

Thus besides the date (incl. microseconds) the current thread name and logger 
name along with the debug level and actual message are logged. If an exception 
is logged, the dump is just appended to the message.

The log file is generally only rolled after a complete log entry (incl. stack 
trace). This means, that files may get slightly bigger than the configured 
maximum to take the complete last entry.

> Replace logback in the osgi/log module
> --------------------------------------
>
>                 Key: SLING-384
>                 URL: https://issues.apache.org/jira/browse/SLING-384
>             Project: Sling
>          Issue Type: Bug
>          Components: OSGi
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> The osgi/log module currently includes LogBack [1] as the logging backend. 
> This library is licensed under LGPL 3.0, which makes it hard to include in 
> Sling. In addition, the full functionality of LogBack is probably not used at 
> all.
> The goal of this issue is to replace LogBack with a very simple 
> implementation of the SLF4J API suitable for our needs, that is:
>    * Log to a file or to the console
>    * Support log file rotation
>    * Support simple log message formatting
> [1] http://www.logback.org

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

Reply via email to