jedipi / NLog.Targets.MicrosoftTeams

A NLog target that writes to Microsoft Teams Channel via O365 Webhook Connector.
https://jedipi.github.io/NLog.Targets.MicrosoftTeams/
MIT License
12 stars 5 forks source link

MicrosoftTeamsClient - Added Layout support for ApplicationName + MachineName #2

Closed snakefoot closed 3 years ago

snakefoot commented 3 years ago

So you can do this:

 <target xsi:type="MicrosoftTeams" 
         name="msTeams" 
         WebhookUrl="${configsetting:name=Logging.TeamsUrl}"          
         ApplicationName="Your Application Name"
         CardTitle="Title - ${level:uppercase=true}: ${date} - [${logger}]"
         layout="[${level:uppercase=true}] ${logger} - ${message} ${all-event-properties}"
    />
jedipi commented 3 years ago

Thanks @snakefoot for the nice addiction. I will merge and push a new release to nuget

snakefoot commented 3 years ago

Happy to help