It's not a secret anymore!*
The moose likes Struts and the fly likes [VERY URGENT]Logging in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "[VERY URGENT]Logging in Struts" Watch "[VERY URGENT]Logging in Struts" New topic

[VERY URGENT]Logging in Struts

Anirban dutta
Ranch Hand

Joined: Aug 08, 2002
Posts: 89
Hello everybody,
Can anyone please tell me that how can I generate locale-specific messages using commons-logging API in struts. Please help me. It's very urgent.
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 566
what do you want to make locale-specific? the language, the dates, the times? If you want to use different languages, you'll need to use the utils.MessageResources class and put your logging strings in property files.
Just a caveat - it might make difficulties when you get an error on the property files - you won't be able to log anything.

I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
It is sorta covered in the JavaRanch Style Guide.
subject: [VERY URGENT]Logging in Struts