some friends just finished the implementation of an app and they use Custom Exceptions. something that took my attention is that when a custom exception was raised they logged the exception in the code of the exception base class they implemented. so my question will be is this a good design approach?. my thinking is that a logging helpe...
I want to add logging to the ASP.NET 2.0 web site that I've inherited from a previous developer. The application just spits out exceptions when they occur, and there's no record of financial transactions that have executed.
I've been looking at Log4net, which I've used in the past, as well as NLog and BitFactory. What I really need to...
Hi All
C# Development:
I am calling a webservice/other methods in a try catch block with different parameters some of which may be custom objects. Please comment on the best way to log the parameters in a text file in case of an exception. Also is it possible to skip out some fields from an object (say for example if an object contain...
I’m used to having try/catch blocks in every method. The reason for this is so that I can catch every exception at the point of infraction and log it. I understand, from my reading and conversations with others, that this isn’t a popular view. One should only catch what one is prepared to handle. However, if I don’t catch at the point of...
Hi,
I have an application that scans a set of files. And this scanning take place parallely. I mean if I upload 5 files, five process will be created and start executing the job parallely. Now For logging the exceptions for the jobs running, there is only one log file. The problem that is coming is, the logger creates a lot of logs file...
I tried this solution with Elmah.XmlFileErrorLog but I'm getting following exception
System.ArgumentNullException was unhandled by user code
Message="Value cannot be null.\r\nParameter name: context"
Source="Elmah"
ParamName="context"
StackTrace:
at Elmah.ErrorSignal.FromContext(HttpContext context) in c:\builds\ELMAH\src...
I'm building a PHP library that throws various custom Exceptions when it encounters errors. I need to log those exceptions and provide various implementations of the Logger so they could be logged in a file or a database.
The exceptions need to be logged whether they are caught or not, so that excludes implementing any of this in a cust...