[logback-user] Localized log level names

Dario Campagna campagna at esteco.com
Fri Jun 1 16:51:36 CEST 2012

Hi Ceki,

> Have you considered customizing LevelConverter [1] ?

I followed your suggestions and implemented with success a customized
This solution for level names internationalization is of course less
invasive than the one I devised (that consists in modifying the Level

However, the use of the new conversion word for obtaining localized
level names leads to higher computation time in the application I am
working on. For example, running the application on an input that
leads to the generation of about 63000 logging event, when using the
conversion word level in patterns (1) the execution takes about 22
seconds, while when using the new conversion word for localized level
names (2) takes about 66 seconds. Using the solution I devised (3) the
application takes 46 seconds to terminate.

The main difference I noticed between the three executions is the
number of invocations to the method makePropertyResourceBoundle of the
class CAL10NResourceBoundleFinder. For (1) that method is invoked
about 500 times, and the execution times of these invocation sum up to
about 34 seconds. For (2) we have about 19 invocations for a total of
299 ms. For (3) about 266 invocations for a total of 18 seconds.

I still have to see what exactly that method does, however I find this
differences in the number of invocations a bit strange.


More information about the Logback-user mailing list