|
Hello I started using NLog and I have some excpetions I want to log, code sample is like this:
try {
blabla;
}
catch (SomeExceptionType ex)
{
logger.ErrorException("this is some exception", ex);
}
and when exception occurs, all I see in log is text "this is some exception", but I also want to see message of exception, how can this be done? My config file looks like this:
<targets> <target name="logfile" xsi:type="File" fileName="log.txt" /> <target name="console" xsi:type="Console"/> </targets>
<rules> <logger name="*" minlevel="Info" writeTo="logfile" /> <logger name="*" minlevel="Info" writeTo="console" /> </rules>
Thanks for help!
|