6 messages in org.apache.logging.log4j-userUsing log4j for writing a library...
FromSent OnAttachments
Marepalli, SomeshJun 3, 2004 2:32 pm 
Jacob KjomeJun 3, 2004 5:33 pm 
WJCarpenterJun 3, 2004 10:26 pm 
Marepalli, SomeshJun 4, 2004 6:05 am 
Marepalli, SomeshJun 4, 2004 6:11 am 
Jacob KjomeJun 4, 2004 5:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Using log4j for writing a library...Actions...
From:Marepalli, Somesh (Some@ca.com)
Date:Jun 3, 2004 2:32:58 pm
List:org.apache.logging.log4j-user

Hi:

I am writing a Java based library for which I am using the log4j package (version 1.2.8)

I am new to log4j. I am confused about the following points:

a) Are there any special things we need to worry about configuration.

Currently, I am considering configuration from a properties file using the PropertyConfigurator class when the library

initializes. I am planning to include a logging .properties file within my .jar file for the library.

The case I am considering I when users (read as applications) of my library may also be using log4j. I am not sure if I

use PropertyConfigurator class without resetting logging configuration of a user in that case.

Specifically, I would like all loggers within my library to be at least at the WARN level. Is there a way I can ensure that

even if I am writing a library.

b) For RollingFileAppender, is there a nice way to specify location of log file without hard-coding the path. I am interested in knowing what other library writers do in such cases.

Hope the user community can help me with these questions.

regards

Somesh Marepalli