Skip to content

Instantly share code, notes, and snippets.

@stlsw
stlsw / NLog.config.xml
Created April 22, 2019 14:11 — forked from relyky/NLog.config.xml
NLog, Programmatic Configuration write to database
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
<targets async="true">
<!-- for log -->
@stlsw
stlsw / gist:8ea7422dd9d1e62c5300b176e814b783
Created July 15, 2017 11:50 — forked from rstackhouse/gist:1162357
Configure NLog Programmatically
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLog;
using NLog.Common;
using NLog.Targets;
using NLog.Config;
namespace ConsoleApplication1