[logback-dev] ISO8601 format

Ceki Gülcü ceki at qos.ch
Wed Jun 18 10:19:00 CEST 2014


Hi Michael,
  On 6/18/2014 8:10, Michael Osipov wrote:

> That argument does count "maintain backward compatibility" because
> Logback broke it already several times in a patch version:
>
> 1.1.2: Removed deprecated constructors in SocketAppender and related
> classes.
> 1.0.7: Groovy and Janino upgrade
> 1.0.2: By default PatternLayout will now output its pattern at the top
> of log files
>
> and so forth, so it is a lousy argument.

Right. I am not advocating backward compatibility as an absolute 
principle which can never be infringed. There are occasions where 
backward compatibility needs to abandoned in light of other considerations.

Let me respond to the examples you brought up where compatibility was 
broken:

 > 1.1.2: Removed deprecated constructors in SocketAppender and related
 > classes.

IMO, the code in SocketAppender needs to be partially re-written to make 
it less confusing. I'd expect much heavier changes there in the future.

 > 1.0.7: Groovy and Janino upgrade

When a component that logback optionally depends on, e.g Janino, breaks 
compatibility, there is no alternative that can keep everyone happy in 
every case.

No later than as yesterday, I was bitten by the Janino issue in a client 
project. My project relies on logback 1.1.3 for logging and on  Janino 
2.5 to perform certain computations. In order to enable logback features 
requiring Janino (version 2.6), I had to adapt parts of the project code 
to use Janino 2.6 (instead of 2.5). Luckily, the required changes were 
not too extensive *and* the affected code was under the control of my 
team. The problem would have become unsolvable otherwise.

Had logback not upgraded to Janino 2.6 and stayed with 2.5, the 
compatibility problem would have been just as bad if my client project 
depended on Janino 2.6 (instead of 2.5).

 > 1.0.2: By default PatternLayout will now output its pattern at the
 > top of log files

The sentence "By default PatternLayout will now output..." is in the 
release notes [1] of version 1.0.2 dated 2012-04-26. However, the 
sentence that _just_ follows it, states:

    This feature, although still available, is no longer enabled by
    default. See release notes for version 1.0.3 for details.

In 1.0.2, it was decided to add by default a comment at the top each log 
file in order to help with the parsing. After the release of 1.0.2, 
several people complained about the change. See

   http://jira.qos.ch/browse/LOGBACK-201

A survey was created to request user input. It appeared that a majority 
of the users preferred not to enable by default printing of the pattern 
as the first line in the log files. Bowing to popular demand, the 
compatibility breaking change was *reverted* in 1.0.3.

It seems to me that the ISO8601-related case bears many resemblances to 
LOGBACK-201.

Cheers,

[1] http://logback.qos.ch/news.html

> Michael

--
Ceki


More information about the logback-dev mailing list