Blazor.Serilog.Sinks.SQLite 1.0.3

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

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

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

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

Repository Stars
neozhu/CleanArchitectureWithBlazorServer
This is a repository for creating a Blazor Server dashboard application following the principles of Clean Architecture
Version Downloads Last updated
1.0.8 4,835 6 months ago
1.0.7 112 6 months ago
1.0.6 12,024 12/24/2023
1.0.5 152 12/24/2023
1.0.4 151 12/24/2023
1.0.3 226 12/24/2023
1.0.2 214 12/24/2023
1.0.1 177 12/24/2023
1.0.0 211 12/24/2023

1.0.0 add columns (Timestamp, Level, Exception, Message, Properties,MessageTemplate,LogEvent,UserName,ClientIP,ClientAgent)
     -  ðŸŒˆ support.net 8 blazor