how to override error method in c# log4net -


i ask if possible override log methods or create new 1 properties in method.

at moment can use it:

globalcontext.properites["details"] = "some info"; log.error("some info",exception); 

i use it:

log.myspecialerror(details, message, exception); 

any advice appreciated

ori

create own extension method.

it must defined in static class, , static method. e.g.

definitions:

public static class log4netextensions {     public static void myspecialerror(this log log, string details, string message, exception exception)     {         //do parameters     } } 

use:

log.myspecialerror(details, message, ex); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -