.net - Log4Net Logging Exceptions -


I know that I can log exceptions to the database using Log4Net, but I break up one exception

Does anyone know that it is available, if someone has done it or manually databases Exceptions are easy to log in?

Cheers Anthony

UPDATE:

If it possibly helps to use the following:

  • Does anyone Know that it is available?
    • I'm following this description:
      • Exception type
      • Exception message
      • Exceptionsource
      • Targeted exceptions
    • If anyone has done this?
    • Is it easy to log exceptions to the database manually?

    Perhaps the format changes will help.

As requested, you can use the approach outlined here: possibly log4net To use additional custom information about certain exceptions to use custom properties in thread context

  public zero log-date exception (log level level) , String message, exception exception) {log4net.ThreadContext.Properties ["exceptionType"] = exception.GetType () AssemblyQualifiedName; // log4net.ThreadContent.Properties.Remove the appropriate logging statement ("exceptionType"); // clean it, so it is not used in future calls)  

and then in its format:

  & lt; Conversion value = "% property {exception exception"} "/>  

It is worth testing / research to see if this thread is secure (name indicates that it is , But it can not hurt to be tested). You also want to ensure that do not include subsequent log messages in their messages (i.e., make sure it is cleared).

< P> (marked as wiki because it is especially mer The answer is no, only to collect various information and discussion in the comments on the North).


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -