[logback-dev] MessageFormatter

Ruediger zu Dohna ruediger.dohna at 1und1.de
Mon Jan 18 13:39:27 CET 2010


Logback has two levels of formatting: One for the complete log entry and 
one for the log message itself. While it's flexible with the first, it's 
restrictive with the second, as the MessageFormatter class is right now 
a static-methods-only singleton. By making it an interface with a 
default implementation, one could reconfigure a Layout to use a 
different Formatter with other features.

We'd like to have a message formatter that:
1. Appends all arguments that don't have a formatting anchor ("{}").
2. Configurably allow special formatting of arguments of some class.

The workaround we are living with now is to use mainly a copy of the 
current MessageFormatter class.

Before I file an JIRA entry and maybe even provide a patch, I'd like to 
know what others think.


More information about the logback-dev mailing list