0

Hi,
We have been using Log4Net to log errors and exception in my application, its a pretty huge project, and I know the messages are logged Asynchronously, but for a few cases the method and message that is getting logged is empty,
Ex : Date:09-05-2012 22:16:13,Level:ERROR,Message:,Method:MonitorTimer,ClassName:ABC.DEF.BO.SchedulerBO.Scheduler,Parameters:,User:Admin,
The Message is empty, parameters are empty.
When I analysed the code, there is no copex code written, all that is there is just a catch block to handle exception inside which the exception is logged. The message is nothing but 'ex.Message',
does any1 have even a slightest idea of what could be leading to this problem.
Thanks in advance.

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by thines01
0

This is the catch block which is logged as explained in the above code.

 catch (Exception ex)
                {
                    // Log the error to file
                    MessageBusLogger.LogError("MonitorTimer", LogWriter.Level.ERROR,
                      ex.Message, ex.InnerException, "", ToString());
                }
0

Can you tell the exception type?

Is there any spot in the code that intentionally throws its own exceptions.
Maybe the code is throwing a false exception causing the message to be empty.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.