X.Extensions.Serilog.Sinks.Telegram
2.0.1-rc
Prefix Reserved
dotnet add package X.Extensions.Serilog.Sinks.Telegram --version 2.0.1-rc
NuGet\Install-Package X.Extensions.Serilog.Sinks.Telegram -Version 2.0.1-rc
<PackageReference Include="X.Extensions.Serilog.Sinks.Telegram" Version="2.0.1-rc" />
paket add X.Extensions.Serilog.Sinks.Telegram --version 2.0.1-rc
#r "nuget: X.Extensions.Serilog.Sinks.Telegram, 2.0.1-rc"
// Install X.Extensions.Serilog.Sinks.Telegram as a Cake Addin #addin nuget:?package=X.Extensions.Serilog.Sinks.Telegram&version=2.0.1-rc&prerelease // Install X.Extensions.Serilog.Sinks.Telegram as a Cake Tool #tool nuget:?package=X.Extensions.Serilog.Sinks.Telegram&version=2.0.1-rc&prerelease
X.Extensions.Serilog.Sinks.Telegram
X.Serilog.Sinks.Telegram is an open-source Serilog sink that allows you to send log events to Telegram. It's a convenient way to integrate Telegram as a logging output, enabling you to receive important log information directly in your chat.
Features
Real-time Logging: The sink offers the ability to send log events to a Telegram channel in real-time, ensuring that you can stay up-to-date with your application's behavior and any issues as they arise.
Customizable Formatting: You can configure the format of log messages sent to the Telegram channel, allowing you to tailor them to your preferences and specific requirements.
Filtering: The sink supports filtering log events before they are dispatched to the Telegram channel, ensuring that only pertinent information is shared.
Asynchronous Sending: Log events are sent asynchronously to the Telegram channel, minimizing potential impact on your application's performance.
Easy Configuration: Configuring the sink to work with your Telegram channel is straightforward, and you can find comprehensive information in the Configuration Wiki.
Getting Started
To begin using the X.Serilog.Sinks.Telegram sink, follow these steps:
- Install the Package: You can install the sink package from NuGet using the following command:
dotnet add package X.Serilog.Sinks.Telegram
- Configure the Sink: Set up the Telegram sink with the appropriate settings in your application's configuration. Here's an example configuration in C#:
Log.Logger = new LoggerConfiguration()
.WriteTo.TelegramCore(
token: botToken,
chatId: loggingChatId,
logLevel: LogEventLevel.Verbose)
.WriteTo.Console()
.CreateLogger();
- Start Logging: Once the sink is configured, you can log in using Serilog as usual. Log events will be sent to your Telegram channel.
For more detailed configuration options, please refer to the Configuration Wiki.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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 is compatible. 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. |
-
net6.0
- Serilog (>= 4.0.2)
- X.Extensions.Logging.Telegram.Base (>= 2.0.1-rc)
-
net8.0
- Serilog (>= 4.0.2)
- X.Extensions.Logging.Telegram.Base (>= 2.0.1-rc)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.1-rc | 47 | 10/27/2024 |