NLog.Telegram.Format.Core
1.0.3
dotnet add package NLog.Telegram.Format.Core --version 1.0.3
NuGet\Install-Package NLog.Telegram.Format.Core -Version 1.0.3
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.Core" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NLog.Telegram.Format.Core --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NLog.Telegram.Format.Core, 1.0.3"
#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.Core as a Cake Addin #addin nuget:?package=NLog.Telegram.Format.Core&version=1.0.3 // Install NLog.Telegram.Format.Core as a Cake Tool #tool nuget:?package=NLog.Telegram.Format.Core&version=1.0.3
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.Format" />
</extensions>
<targets async="true">
<target xsi:type="Telegram"
name ="telegramTarget"
layout="${message}"
botToken ="xxx"
chatId="xxx"
format="MARKDOWN"
/>
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="telegramTarget" />
</rules>
</nlog>
Example
var log = LogManager.GetCurrentClassLogger();
log.Debug($"`hello world` **hello world** __hello world__");
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 | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- NLog (>= 4.6.0)
- NLog.Config (>= 4.6.0)
- NLog.Schema (>= 4.6.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on NLog.Telegram.Format.Core:
Package | Downloads |
---|---|
SHL.Common.ApiClients.ResultApi
Package Description |
|
SHL.Common.ApiClients.PersonalAccountApi
Package Description |
|
SHL.Common.ApiClients.InternalApi
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Fix problem async pending.