Serilog.Sinks.SQLite 5.0.0-dev-00086

This is a prerelease version of Serilog.Sinks.SQLite.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Serilog.Sinks.SQLite --version 5.0.0-dev-00086
NuGet\Install-Package Serilog.Sinks.SQLite -Version 5.0.0-dev-00086
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.SQLite" Version="5.0.0-dev-00086" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Sinks.SQLite --version 5.0.0-dev-00086
#r "nuget: Serilog.Sinks.SQLite, 5.0.0-dev-00086"
#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 Serilog.Sinks.SQLite as a Cake Addin
#addin nuget:?package=Serilog.Sinks.SQLite&version=5.0.0-dev-00086&prerelease

// Install Serilog.Sinks.SQLite as a Cake Tool
#tool nuget:?package=Serilog.Sinks.SQLite&version=5.0.0-dev-00086&prerelease

Serilog.Sinks.SQLite

A lightweight high performance Serilog sink that writes to SQLite database.

Getting started

Install Serilog.Sinks.SQLite from NuGet

Install-Package Serilog.Sinks.SQLite

Configure logger by calling WriteTo.SQLite()

var logger = new LoggerConfiguration()
    .WriteTo.SQLite(@"Logs\log.db")
    .CreateLogger();
    
logger.Information("This informational message will be written to SQLite database");

XML <appSettings> configuration

To use the SQLite sink with the Serilog.Settings.AppSettings package, first install that package if you haven't already done so:

Install-Package Serilog.Settings.AppSettings

In your code, call ReadFrom.AppSettings()

var logger = new LoggerConfiguration()
    .ReadFrom.AppSettings()
    .CreateLogger();

In your application's App.config or Web.config file, specify the SQLite sink assembly and required sqliteDbPath under the <appSettings> node:

<appSettings>
    <add key="serilog:using:SQLite" value="Serilog.Sinks.SQLite"/>
    <add key="serilog:write-to:SQLite.sqliteDbPath" value="Logs\log.db"/>
    <add key="serilog:write-to:SQLite.tableName" value="Logs"/>
    <add key="serilog:write-to:SQLite.storeTimestampInUtc" value="true"/>
</appSettings>    

Performance

SQLite sink automatically buffers log internally and flush to SQLite database in batches on dedicated thread.

Build status


Many thanks to the <img src="resources/jetbrains.svg" width="100px"/> for donating awesome suite of tools making this project possible.

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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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 (4)

Showing the top 4 NuGet packages that depend on Serilog.Sinks.SQLite:

Package Downloads
Devon4Net.Infrastructure.Logger

devon4net logger library

Afx.Zb.Common

常用公共类库

Plugga.Core

Plugga.Core lets you quickly create modular ASP .Net Core applications searching, loading and configuring any "pluggable" component. Pluggable components are a little set of commonly used objects as Controllers, DbContexts, Razor Pages, SignalR Hubs, HostedServices, static assets and, of course, your own component objects.

QCommon.SeriLog

支持SEQ

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Serilog.Sinks.SQLite:

Repository Stars
Warewolf-ESB/Warewolf
Effortless Microservice Design and Integration. This repository includes the code-base for the Warewolf Studio and Server.
Corsinvest/cv4pve-admin
Corsinvest for Proxmox VE Web Admin Clusters - vCenter but for Proxmoxm VE
Version Downloads Last updated
6.0.0 34,511 5/1/2023
5.5.0 52,112 7/1/2022
5.0.0 133,879 11/26/2019
5.0.0-dev-00086 1,208 5/31/2019
5.0.0-dev-00082 777 3/18/2019
4.5.0 51,668 1/2/2019
4.0.0 9,469 7/3/2018
3.9.1 1,139 5/31/2018
3.9.0 1,467 1/18/2018
3.8.3 22,331 4/12/2017
3.8.1 1,066 4/5/2017
3.8.0 1,096 2/5/2017
3.7.4 1,066 11/26/2016
3.6.5 1,228 10/21/2016
3.5.8 1,031 10/4/2016
3.5.3 1,051 9/24/2016
3.0.2 1,418 9/19/2016
2.0.1 1,481 9/18/2016
1.1.16 1,402 9/17/2016
1.1.15 1,309 9/17/2016
1.1.14 1,515 9/17/2016
1.1.13 1,505 9/17/2016