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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -