You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by becarios mx <be...@yahoo.com.mx> on 2004/09/22 00:02:11 UTC

Another question about %F:%L

Hello everybody !!

I was checking threads related with %F:%L problem but
I am confused about the solution.

I am reading the "Short introduction to log4cxx"
document bundled with log4cxx-0.9.7 and it suggests a
couple of examples (MyApp.c and MyApp2.c). The second
one uses a configuration file, and the document
exposes three examples for this configuration file. 

Everything runs fine so far, but when I try the second
example with the third conf file (the one that uses
the %F:%L options), I do not get the output that is
supposed to I should get (according this document).

To be a little bit more clear, MyApp2.cpp does not use
any of the LOG4CXX_ macros, but it is supposed to have
an output like:

INFO [main] (MyApp2.cpp:31) - Entering application.
DEBUG [main] (Bar.h:16) - Doing it again!
 INFO [main] (MyApp2.cpp:34) - Exiting application.

when the last conf file suggested is used. Instead I
get:

 INFO [4048] (:-1) - Entering application.
DEBUG [4048] (:-1) - Did it again!
 INFO [4048] (:-1) - Exiting application.


Does anyone have any enlightment about this?

Thank you very much,
Elsa.





_________________________________________________________
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx

Re: Another question about %F:%L

Posted by becarios mx <be...@yahoo.com.mx>.
Dear Mr. Arnold:

Thank you very much for your response and for the
link. I am already checking it out.

Best regards,
Elsa.



_________________________________________________________
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx

Re: Another question about %F:%L

Posted by Curt Arnold <ca...@apache.org>.
The intro to log4cxx is misleading in that omits several default  
arguments in the prototypes for Logger.debug and similar.
Those methods have arguments for the current source file name and line  
number which are provided when the LOG4CXX_ macros are used. The short  
answer is to use the macros.

See  
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx- 
user@logging.apache.org&msgNo=196

I've opened a bug report on the issue so it doesn't drop off of  
everybody's To-DO list, http://nagoya.apache.org/jira/browse/LOGCXX-16


>
> Does anyone have any enlightment about this?