NLog.Telegram.Format
1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package NLog.Telegram.Format --version 1.0.1
NuGet\Install-Package NLog.Telegram.Format -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NLog.Telegram.Format" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NLog.Telegram.Format --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NLog.Telegram.Format, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NLog.Telegram.Format as a Cake Addin #addin nuget:?package=NLog.Telegram.Format&version=1.0.1 // Install NLog.Telegram.Format as a Cake Tool #tool nuget:?package=NLog.Telegram.Format&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NLog.Telegram
An NLog target for Telegram with the avaiable format which provided by Telgram. Available format: MARKDOWN HTML5 for more : https://core.telegram.org/bots/api#formatting-options
This repository referenced by : https://github.com/narfunikita/NLog.Telegram
Usage
- Create a TelegramBot(https://core.telegram.org/bots#3-how-do-i-create-a-bot).
- Configure NLog to use
NLog.Telegram
: https://github.com/nlog/nlog/wiki/Configuration-file
NLog.config
<?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">
<extensions>
<add assembly="NLog.Telegram" />
</extensions>
<targets async="true">
<target xsi:type="Telegram"
name ="telegramTarget"
layout="${message}"
botToken ="xxx"
chatId="xxx"
format="MARKDOWN"
/>
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="telegramTarget" />
</rules>
</nlog>
Configuration Options
Key | Description |
---|---|
BotToken | Your telegram bot token (e.g 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11) |
ChatId | Unique identifier for the message recipient � User or GroupChat id |
BaseUrl | Optional. Api bot Url. Default: https://api.telegram.org/bot |
Format | Optional. Render layout for telegram message. Default : DEFAULT |
Reference: https://github.com/narfunikita/NLog.Telegram
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- NLog (>= 4.6.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Changed read me.