what is best way to use logger in JSF application
+1
A:
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
2010-03-23 10:48:41
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
2010-03-24 17:10:56
not any that I'm aware of. But it is fairly simple ti write it by hand - you'll get used to it.
Bozho
2010-03-24 18:06:54