public
Created

Example NLog config file for custom SMS target

  • Download Gist
gistfile1.xml
XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<?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">
 
<!--
See http://nlog-project.org/wiki/Configuration_file
for information on customizing logging rules and outputs.
-->
<extensions>
<add assembly="Twilio.Targets"/>
</extensions>
 
<targets>
<!-- add your targets here -->
<target name="sms1" xsi:type="Sms"
AccountSid="<<AccountSid>>"
AuthToken="<<AuthToken>>"
From="<<From>>"
To="+<<To>>" />
 
<!--
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
layout="${longdate} ${uppercase:${level}} ${message}" />
-->
</targets>
 
<rules>
<!-- add your logging rules here -->
<logger name="*" minlevel="Warn" writeTo="sms1" />
 
<!--
<logger name="*" minlevel="Trace" writeTo="f" />
-->
</rules>
</nlog>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.