c# - How to integrate NLog to write log to Azure Streaming log -


currently using nlog write application errors text file. how can configure nlog write error messages azure streaming log apart writing azure blob storage?

thanks

the azure streaming log captures sent trace interface. if configure nlog send target, can access through output window in visual studio instance.

here how configured nlog.config obtain result:

  <targets>     <target xsi:type="file" name="f" filename="${basedir}/logs/${shortdate}.log" layout="${longdate} ${uppercase:${level}} ${message} ${exception:format=tostring}" />     <target xsi:type="trace" name="trace" layout="${logger} ${message} ${exception:format=tostring}" />   </targets>    <rules>     <logger name="*" minlevel="info" writeto="f" />     <logger name="*" minlevel="trace" writeto="trace" />   </rules> 

the first target should resemble 1 have logging file, second sends data trace channel.

hope helps!


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -