You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by lim xu <lx...@yahoo.com> on 2007/05/08 17:08:47 UTC
IAppender, IOptionHandler oddity
Hi all,
In our software, we implemented a custom database appender that implements the IAppender, IOptionHandler interfaces, it's called "ApplicationErrorDB".
Now this class is not only used by log4net, but I also directly access it through our code as well because I added some additional methods for our software to use.
Anyway, one of my method threw an exception when one of our beta testers were testing it and the log4net rolling file recorded the strangest error. It recorded a physical drive on MY machine like so
"System.FormatException: Input string was not in a correct format.
at Civion.PM.DataAccess.ApplicationErrorDB.LogServerException(Exception ex) in D:\Websites\Civion\Projects\PM1\ProjectManagement\Source\Data Access Layer\Civion.PM.DataAccess\ApplicationErrors\ApplicationErrorDB.cs"
That's the physical address to the source code on my local machine, I did not hard code this physical path anywhere in my code, how in the world my beta tester who is thousands of miles away getting the path?
When I compiled my project (which references log4net), is that somehow compiled into somewhere? I can't figure it out.
Thanks
---------------------------------
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.
RE: IAppender, IOptionHandler oddity
Posted by lim xu <lx...@yahoo.com>.
Nicko,
Thanks a lot. Truly appreciate it. I guess it's just confusing to my customers that when they look into the log files, they see "D:/whateverhwatever" that doesn't even exist on their system, immediately, they report back something is really wrong which makes me nervous.
I don't see any PDB files being distributed with the software to client and the assemblies were compiled under a custom "mode" called "FreeTrial", going to have to look again, but in our web.config, we disabled debug=true that's for sure.
nicko@apache.org wrote: v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} This is a feature of .net intended to help you debug issues in your code. It also helps the debugger know what source to display for each stack frame. Have you built your assembly with debug enabled? Have you included the debug PDB files with the assembly? This is not related specifically to log4net, but just a feature of .net in general.
Log4net can extract this information from the call stack when a message is logged. The %file and %line patterns can be used to extract the source code location of the logging call, however this is rather slow to generate and probably should not be used for general logging.
Cheers,
Nicko
------------
Nicko Cadell
log4net development
http://logging.apache.org/log4net
From: lim xu [mailto:lx2222182@yahoo.com]
Sent: 08 May 2007 16:09
To: Log4NET User
Subject: IAppender, IOptionHandler oddity
Hi all,
In our software, we implemented a custom database appender that implements the IAppender, IOptionHandler interfaces, it's called "ApplicationErrorDB".
Now this class is not only used by log4net, but I also directly access it through our code as well because I added some additional methods for our software to use.
Anyway, one of my method threw an exception when one of our beta testers were testing it and the log4net rolling file recorded the strangest error. It recorded a physical drive on MY machine like so
"System.FormatException: Input string was not in a correct format.
at Civion.PM.DataAccess.ApplicationErrorDB.LogServerException(Exception ex) in D:\Websites\Civion\Projects\PM1\ProjectManagement\Source\Data Access Layer\Civion.PM.DataAccess\ApplicationErrors\ApplicationErrorDB.cs"
That's the physical address to the source code on my local machine, I did not hard code this physical path anywhere in my code, how in the world my beta tester who is thousands of miles away getting the path?
When I compiled my project (which references log4net), is that somehow compiled into somewhere? I can't figure it out.
Thanks
---------------------------------
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
RE: IAppender, IOptionHandler oddity
Posted by ni...@apache.org.
This is a feature of .net intended to help you debug issues in your
code. It also helps the debugger know what source to display for each
stack frame. Have you built your assembly with debug enabled? Have you
included the debug PDB files with the assembly? This is not related
specifically to log4net, but just a feature of .net in general.
Log4net can extract this information from the call stack when a message
is logged. The %file and %line patterns can be used to extract the
source code location of the logging call, however this is rather slow to
generate and probably should not be used for general logging.
Cheers,
Nicko
------------
Nicko Cadell
log4net development
http://logging.apache.org/log4net
From: lim xu [mailto:lx2222182@yahoo.com]
Sent: 08 May 2007 16:09
To: Log4NET User
Subject: IAppender, IOptionHandler oddity
Hi all,
In our software, we implemented a custom database appender that
implements the IAppender, IOptionHandler interfaces, it's called
"ApplicationErrorDB".
Now this class is not only used by log4net, but I also directly access
it through our code as well because I added some additional methods for
our software to use.
Anyway, one of my method threw an exception when one of our beta testers
were testing it and the log4net rolling file recorded the strangest
error. It recorded a physical drive on MY machine like so
"System.FormatException: Input string was not in a correct format.
at Civion.PM.DataAccess.ApplicationErrorDB.LogServerException(Exception
ex) in D:\Websites\Civion\Projects\PM1\ProjectManagement\Source\Data
Access
Layer\Civion.PM.DataAccess\ApplicationErrors\ApplicationErrorDB.cs"
That's the physical address to the source code on my local machine, I
did not hard code this physical path anywhere in my code, how in the
world my beta tester who is thousands of miles away getting the path?
When I compiled my project (which references log4net), is that somehow
compiled into somewhere? I can't figure it out.
Thanks
________________________________
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.