[logback-user] Localized log level names

Dario Campagna campagna at esteco.com
Tue Jun 5 14:42:39 CEST 2012


Hi Ceki,

> Thanks for sharing this code. It's probably a minor detail but instead
> of switching on a String which requires JDK 7, you could switch on the
> integer corresponding to a Level. The Level.toInt() method [1] returns
> this integer. The integer constant for DEBUG is given by
> Level.DEBUG_INT [2], for INFO by Level.INFO_INT and so forth.

Ok, thank for your suggestion.

> BTW, the code for the Levels enum is missing. For future reference, it
> would be very nice if you could create a github project for this code.

I just created a github project for my custom level converter, here is the link

https://github.com/dario-campagna/CAL10N-level-converter


Cheers,
Dario


More information about the Logback-user mailing list