Serilog.Sinks.SQLite
5.0.0-dev-00086
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
<PackageReference Include="Serilog.Sinks.SQLite" Version="5.0.0-dev-00086" />
paket add Serilog.Sinks.SQLite --version 5.0.0-dev-00086
#r "nuget: Serilog.Sinks.SQLite, 5.0.0-dev-00086"
// 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.
Many thanks to the <img src="resources/jetbrains.svg" width="100px"/> for donating awesome suite of tools making this project possible.
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. 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. |
.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. |
-
.NETFramework 4.5.2
- Microsoft.CSharp (>= 4.5.0)
- Newtonsoft.Json (>= 12.0.1)
- Serilog (>= 2.8.0)
- System.Data.SQLite.Core (>= 1.0.110)
-
.NETFramework 4.7.2
- Microsoft.CSharp (>= 4.5.0)
- Newtonsoft.Json (>= 12.0.1)
- Serilog (>= 2.8.0)
- System.Data.SQLite.Core (>= 1.0.110)
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.5.0)
- Newtonsoft.Json (>= 12.0.1)
- Serilog (>= 2.8.0)
- System.Data.SQLite.Core (>= 1.0.110)
NuGet packages (7)
Showing the top 5 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 |
|
AspNetCoreMicroserviceInitializer.TradingDesk
This library provides the inventory for AspNetCoreMicroserviceInitializer.Registrations. This library contains: - Attributes. - Enums. - Exceptions. - HangfireFilters. - Helpers. - Interfaces. - Migration services. - Settings. The most up-to-date documentation on GitHub Wiki: https://github.com/qpashkaaa/Asp-Net-Core-Microservice-Initializer/wiki. |
GitHub repositories (4)
Showing the top 4 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.
|
|
serilog-contrib/serilog-ui
Simple Serilog log viewer UI for several sinks.
|
|
lanedirt/AliasVault
E2E encrypted password and (email) alias manager
|
|
Corsinvest/cv4pve-admin
Corsinvest for Proxmox VE Web Admin Clusters - vCenter but for Proxmoxm VE
|
Version | Downloads | Last updated |
---|---|---|
6.0.0 | 86,024 | 5/1/2023 |
5.5.0 | 75,239 | 7/1/2022 |
5.0.0 | 155,716 | 11/26/2019 |
5.0.0-dev-00086 | 1,241 | 5/31/2019 |
5.0.0-dev-00082 | 806 | 3/18/2019 |
4.5.0 | 56,675 | 1/2/2019 |
4.0.0 | 10,903 | 7/3/2018 |
3.9.1 | 1,191 | 5/31/2018 |
3.9.0 | 1,516 | 1/18/2018 |
3.8.3 | 22,416 | 4/12/2017 |
3.8.1 | 1,123 | 4/5/2017 |
3.8.0 | 1,146 | 2/5/2017 |
3.7.4 | 1,110 | 11/26/2016 |
3.6.5 | 1,268 | 10/21/2016 |
3.5.8 | 1,080 | 10/4/2016 |
3.5.3 | 1,106 | 9/24/2016 |
3.0.2 | 1,466 | 9/19/2016 |
2.0.1 | 1,546 | 9/18/2016 |
1.1.16 | 1,450 | 9/17/2016 |
1.1.15 | 1,358 | 9/17/2016 |
1.1.14 | 1,568 | 9/17/2016 |
1.1.13 | 1,557 | 9/17/2016 |