Serilog.Sinks.Zulip 1.0.6

dotnet add package Serilog.Sinks.Zulip --version 1.0.6
                    
NuGet\Install-Package Serilog.Sinks.Zulip -Version 1.0.6
                    
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="Serilog.Sinks.Zulip" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Serilog.Sinks.Zulip" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Serilog.Sinks.Zulip" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Serilog.Sinks.Zulip --version 1.0.6
                    
#r "nuget: Serilog.Sinks.Zulip, 1.0.6"
                    
#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.
#:package Serilog.Sinks.Zulip@1.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Serilog.Sinks.Zulip&version=1.0.6
                    
Install as a Cake Addin
#tool nuget:?package=Serilog.Sinks.Zulip&version=1.0.6
                    
Install as a Cake Tool

Serilog.Sinks.Zulip

serilog-sinks-zulip-icon

NuGet Nuget Downloads publish to nuget

A high-performance, batched asynchronous Serilog sink for the Zulip messaging platform.

Overview

This library provides a production-grade integration for routing structured logs into Zulip channels. It is designed to be non-blocking and network-efficient, ensuring that logging telemetry does not impact application latency.

For more information on the underlying REST API, please refer to the official Zulip API Documentation.

Installation

dotnet add package Serilog.Sinks.Zulip

Configuration Options

The sink can be customized using the ZulipSinkOptions object (or mapped directly from appsettings.json).

Property Type Required Default Description
ServerUrl string Yes - The base URL of your Zulip server (e.g., https://your-org.zulipchat.com).
BotEmail string Yes - The email address of the bot user sending the logs.
ApiKey string Yes - The API key generated for the bot user in Zulip.
Channel string Yes "general" The channel (stream) ID or name where logs will be routed.
DefaultTopic string? No Log Level The topic under which messages will be grouped. If left null, logs are grouped by their LogEventLevel (e.g., "Error", "Warning").

💡 Tip: In Zulip, topics are a powerful way to thread and organize messages within a channel. To learn more about how they work, check out the official Introduction to Topics guide.

Advanced Batching & Formatting Options

When configuring via the extension methods, you also have access to standard Serilog batching and formatting controls:

Parameter Type Default Description
restrictedToMinimumLevel LogEventLevel Debug The minimum log level required to trigger a Zulip message.
batchSizeLimit int 50 The maximum number of log events sent in a single HTTP request.
periodSeconds int 2 The time to wait between batch transmissions.
outputTemplate string Standard Serilog Customize the markdown layout of the message sent to Zulip.

Usage Examples

This library fully supports Serilog.Settings.Configuration. Using appsettings.json prevents hardcoding API keys into your source code.

{
  "Serilog": {
    "Using": [ "Serilog.Sinks.Zulip" ],
    "MinimumLevel": "Information",
    "WriteTo": [
      {
        "Name": "Zulip",
        "Args": {
          "serverUrl": "[https://your-org.zulipchat.com](https://your-org.zulipchat.com)",
          "botEmail": "log-bot@your-org.zulipchat.com",
          "apiKey": "YOUR_ZULIP_API_KEY",
          "channel": "backend-alerts",
          "defaultTopic": "Production Errors",
          "restrictedToMinimumLevel": "Warning",
          "outputTemplate": "**[{Level}]** {Message:lj}{NewLine}{Exception}"
        }
      }
    ]
  }
}

Approach 2: C# Fluent Configuration

If you prefer to configure Serilog via code, you can pass options directly during startup.

using Serilog;
using Serilog.Sinks.Zulip;

Log.Logger = new LoggerConfiguration()
    .MinimumLevel.Information()
    .WriteTo.Zulip(
        serverUrl: "[https://your-org.zulipchat.com](https://your-org.zulipchat.com)",
        botEmail: "log-bot@your-org.zulipchat.com",
        apiKey: "YOUR_ZULIP_API_KEY",
        channel: "backend-alerts",
        defaultTopic: "Production Errors",
        restrictedToMinimumLevel: Serilog.Events.LogEventLevel.Warning
    )
    .CreateLogger();
Product 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.6 143 4/22/2026
1.0.5 122 4/20/2026
1.0.4 105 4/20/2026