what is best way to use logger in JSF application
Asked
Active
Viewed 2,344 times
-1
-
1I am not sure if I understand the question. You're literally asking for a "best way" to use a logger? Which different ways are there then? Please elaborate the actual problem/question. – BalusC Mar 23 '10 at 11:22
-
i am using netbean, is there any plug-in available to insert logger code instead of writing it everytime for each method and class. – rahul_d_m Mar 24 '10 at 17:08
-
You can find the similar answer in this [link](http://stackoverflow.com/questions/13765761/how-to-hide-xhtml-extension-from-url) – akhil koditala Jun 07 '16 at 05:31
1 Answers
1
Well, for example using log4j:
public class SomeManagedBean {
private static final Logger logger = Logger.getLogger(SomeManagedBean.class);
public String someAction() {
logger.debug("Action 'someAction()` executed");
// some code
}
}

Bozho
- 588,226
- 146
- 1,060
- 1,140
-
thank u bozho.. i am using netbeans ide, is there any plug-in available to insert logger code automatically instead of writing it every-time for each method and class. – rahul_d_m Mar 24 '10 at 17:10
-
not any that I'm aware of. But it is fairly simple ti write it by hand - you'll get used to it. – Bozho Mar 24 '10 at 18:06