By default, log4net will log Stack Trace.
I create a wraper which inherit from "ILog" and implement "ILog" interface
directly.
public class MyLogger : ILog
{
...
Error(object message, Exception exception)
{
log.Error(exception.Message);//Now it will show message only.
}
...
}
then log4net.ILog log = new
MyLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
it could work.
However, I want to config log4net without logging stack trace.
but I could not find any useful information.
--
View this message in context:
http://apache-logging.6191.n7.nabble.com/how-to-make-log4net-exclude-Stack-Trace-tp53708.html
Sent from the Log4net - Users mailing list archive at Nabble.com.