private static Log logger = LogFactory.getLog(MyClass.class);
That will produce a logger named after the fully qualified name of the
class (i.e. "com.acme.project.MyClass")
private static Log logger = LogFactory.getLog("MY_LOGGER_NAME");
That will produce a logger named exactly "MY_LOGGER_NAME"
and how to specify the same in the log4J.xml file.
Examples:
<logger name="com.acme.project.MyClass">
<logger name="MY_LOGGER_NAME">
On 3/7/07, Asif Mekrani <[EMAIL PROTECTED]> wrote:
Hi Group,
Please can you tell me how to use the names logger. means :
Usually we use a class name for the logger name, eg:
private static Log logger = LogFactory.getLog(MyClass.class);
but wat if, I want to use a string name instead of the class name , i.e.
private static Log logger = LogFactory.getLog("MY_LOGGER_NAME");
and how to specify the same in the log4J.xml file.
TIA.
Smiles,
Asif
--
James Stauffer http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]