Skip to content

adenisov/NLog.Ifttt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NLog.Ifttt

Build status Nuget (with prereleases)

Use case

Imagine you need a way to be notified about emergencies happening on production in a fraction of second. Adding NLog.Ifttt extension to you logging infrastructure will allow to create a seamless integration with the software that is always by the hand.

Installing

Install-Package NLog.Ifttt

or

dotnet add NLog.Ifttt
  1. Add to your NLog.config
<extensions>
  <add assembly="NLog.Ifttt"/>
</extensions>

<variable name="ifttt_event" value="production_error" />
<variable name="ifttt_key" value="you_key_goes_here" />

<target xsi:type="Ifttt"
                name="ifttt"
                eventName="${ifttt_event}"
                key="${ifttt_key}"
                layout="${layout}"
                value1="${appName}"
                value2="${uppercase:${level}}"
                layoutLocation="Value3">
        </target>

<logger name="notificationLogger" minlevel="Info" writeTo="ifttt" final="true"/>
  1. Obtain url and key here https://ifttt.com/maker_webhooks/settings
  2. Setup Ifttt with a desired way of communication (I prefer Telegram)
  3. Once you have something in the NLog logger you will get a message 😉) Imgur
  4. Enjoy!

Releases

No releases published

Packages

No packages published

Languages