General Settings¶
Stack Frame¶
By default, and for performance reasons, the stack frame of the logging method is not included in log events. This stack frame is needed if you want to log the name of the method which made the log call (see Layouts/Log Format for more information).
To include the calling stack frame in the log events, turn it on on the main <nulog>
element in the config:
1 2 3 4 5 6 7 8 9 10 | <?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="nulog" type="NuLog.Configuration.ConfigurationSectionHandler, NuLog" />
</configSections>
<nulog
includeStackFrame="true"
<!-- ... -->
</nulog>
</configuration>
|
Fallback Logging¶
By default, failures within NuLog are logged to Trace. To log to a text file, instead, set the fallbackLog to the file to log to. The path can be relative, or absolute:
1 2 3 4 5 6 7 8 9 10 | <?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="nulog" type="NuLog.Configuration.ConfigurationSectionHandler, NuLog" />
</configSections>
<nulog
fallbackLog="nulog-fallback.log">
<!-- ... -->
</nulog>
</configuration>
|