AFAIK it does not tell what file it used if you activate
log4j.debug=true.


On Sat, 21 Jun 2003 19:56:20 +0200, Ceki Gülcü wrote:
>
>I think log4j already does what you are asking for, no?
>
>At 07:26 PM 6/21/2003 +0200, you wrote:
>>Ahhhh. It seems I have to start wrestling with sourcecode again.
:-)
>>
>>But to answer your questions: tell / log what you know. If log4j
>>uses
>>default init and found a properties file, then you can tell a
>>filename, if it used an inputerstream, well, then you can't.
>>
>>Tom
>>
>>
>>On Sat, 21 Jun 2003 11:40:00 -0500, Jacob Kjome wrote:
>>>Hi Tom,
>>>
>>>It is certainly not a bad idea, but how do you propose providing
>>>an
>>>"absolute path" for where the configuration file came from?
>>>First,
>>>you cannot determine an absolute path (if you mean file system
>>>path)
>>>if the file is being loaded from an archive such as a ..jar or
>>>.war
>>>file since normal File IO cannot describe paths within the
>>>archive.
>>>However, printing out a URL might be doable.  But then that is
>>>dependent on how the configuration was provided to Log4j.  It
>>>would
>>>have to have come in as an absolute system path or a URL.  What if
>>>the file was loaded via an InputStream?  There is no location, it
>>>is
>>>just a stream of data.  The calling program would know where it
>>>might have obtained the file (although that's not even guaranteed
>>>if
>>>it was just pulled from somewhere arbitrarily on the classpath)
>>>but
>>>log4j wouldn't know where it came from; it would just have the
>>>data.
>>>
>>>So, if you can think of a way to take all the above into account,
>>>that would be great.  Useful patches are always welcome for at
>>>least
>>>a review.  They may not all be accepted, but we encourage
>>>participation from all, not just those who have commit access.
>>>
>>>Jake
>>>
>>>At 02:45 PM 6/21/2003 +0200, you wrote:
>>>Hello developers,
>>>
>>>May I suggest a very simple addition? Either provide a function or
>>>have log4j log (log4j.debug=true) the absolute paths of the
>>>configuration files it has found.
>>>
>>>Currently I have libraries that have log4j configuration files in
>>>their JARs and of course the project itself has one. It would be
>>>great if I could see what file log4j is using.
>>>
>>>Now, you problably will tell me the create the fix myself (it is
>>>open
>>>source software), but I have made a number of such alterations to
>>>open source software, but because I cannot commit to CVS I had to
>>>keep asking developers to please please please incorperate my
>>>bugfixes. I'm not very thrilled to start up another thread. (I
>>>hope
>>>this does not reflect negatively on my request, though.)
>>>
>>>Tom
>>>
>>>
>>>-------------------------------------------------------------------
>>>--
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>--------------------------------------------------------------------
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>
>--
>Ceki  For log4j documentation consider "The complete log4j manual"
>ISBN: 2970036908  http://www.qos.ch/shop/products/clm_t.jsp
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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

Reply via email to