On 7/28/06, Jitendra Kharche <[EMAIL PROTECTED]> wrote:

Thanks James.
Certainly I will not include log4j jar or classes in my jar. Also I will
not include the config file in my jar. But I am worried about the
following two cases which seem to be very common problem (but I have
never came across it)
1. if the user app of my lib is not using log4j
2. if the user app of my lib is using log4j

In both the cases loading the config seems to be a problem.
Please help.

I'd advise:

1. In your library's readme you should list log4j as a dependency,
like, for example, the jakarta commons-httpclient lists commons-codec
and commons-logging as dependencies. The user should be warned that
using your library implies using log4j by your documentation, not by a
ClassDefNotFound exception. You could provide a sample, very simple
log4j configuration file for use in this case.

2. Your library's documentation should include the names of the
loggers you use, and what do they track, so that the end-user can
tailor his/her log4j configuration to provide the exact amount of
information said user requires from the internal works of your
libraries.

cheers,

--
Javier González Nicolini

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to