../../_images/sitetitle3.png

Configuration Template

Introduction

The standard way to configure NuLog is via the standard custom configuration section in your web.config or app.config file. By leveraging this configuration standard, NuLog benefits from the configuration management utilities provided by .Net, including the ability to apply configuration transforms during build/deploy, as is popular with many CI/CD solutions.

Copy Pasta

Here’s a bare-bones configuration for using NuLog. This will direct all log events to Trace:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <section name="nulog" type="NuLog.Configuration.ConfigurationSectionHandler, NuLog" />
    </configSections>
    <nulog>
        <targets>
            <target name="trace" type="NuLog.Targets.TraceTarget" />
        </targets>
        <rules>
            <rule
                include="*"
                targets="trace" />
        </rules>
        <tagGroups>
            <!--<group baseTag="base_tag" aliases="one_tag,two_tag,red_tag,blue_tag" />-->
        </tagGroups>
        <metaData>
            <!--<add key="meta" value="data" />-->
        </metaData>
    </nulog>
</configuration>