InterviewSolution
| 1. |
How Will You Create A Logger In Any Class? |
|
Answer» Any other NAMED Logger OBJECT instance is obtained through the second method by passing the NAME of the logger. The name of the logger can be any string you can pass, usually a class or a PACKAGE name as we have USED in the last chapter and it is mentioned below − static Logger log = Logger.getLogger(log4jExample.class.getName()); Any other named Logger object instance is obtained through the second method by passing the name of the logger. The name of the logger can be any string you can pass, usually a class or a package name as we have used in the last chapter and it is mentioned below − static Logger log = Logger.getLogger(log4jExample.class.getName()); |
|