On Fri, Jan 31, 2014 at 2:13 AM, Remko Popma <remko.po...@gmail.com> wrote:
> I asked a number of Japanese and Chinese colleagues, but nobody seemed to > want the level names translated in the log output. They were all happy > with the English names. About half advised against translating, half was > indifferent, and one person said he wouldn't use it himself but he thought > that other people might want it. > > So maybe this is a "nice-to-have" rather than a "must-have" feature? > Sigh, this has nothing to do with it. Reading the Log4j1 docs will clarify that for you, I'm not sure how you got on to level labels... Customizing the labels on levels is already supported. The idea here is that instead of hard coding message like this: warn("This is a message in English about {} and {}", foo, bar): you say: warn("MESSAGE_KEY", foo, bar); then in your resource bundle (a .properties file), you have: MESSAGE_KEY = "This is a message in English about {} and {}" Then you can have a prop file for each language you want: MESSAGE_KEY = Zut alors! {} et {} Gary > > On Friday, January 31, 2014, Remko Popma <remko.po...@gmail.com> wrote: > >> What does the localization do? >> Is it for translating the built-in level names? >> >> >> On Friday, January 31, 2014, Gary Gregory <garydgreg...@gmail.com> wrote: >> >>> In Log4j 1 we use: >>> >>> - org.apache.log4j.Category.setResourceBundle(ResourceBundle) >>> - org.apache.log4j.Category.l7dlog(Priority, String, Object[], Throwable) >>> >>> It seems v2 makes sidesteps the whole localization/i18n issue. >>> >>> What's the migration path for that? >>> >>> So we'll never play nice with some projects that require playing with >>> resource bundles. >>> >>> Should we recommend creating a Logger wrapper to hold a resource bundle? >>> I'm not sure what else we can do... we could provide it... >>> >>> Thoughts? >>> >>> Gary >>> -- >>> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org >>> Java Persistence with Hibernate, Second >>> Edition<http://www.manning.com/bauer3/> >>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> >>> Spring Batch in Action <http://www.manning.com/templier/> >>> Blog: http://garygregory.wordpress.com >>> Home: http://garygregory.com/ >>> Tweet! http://twitter.com/GaryGregory >>> >> -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory