rio-logging
1.0.0
dotnet add package rio-logging --version 1.0.0
NuGet\Install-Package rio-logging -Version 1.0.0
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="rio-logging" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add rio-logging --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: rio-logging, 1.0.0"
#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 rio-logging as a Cake Addin #addin nuget:?package=rio-logging&version=1.0.0 // Install rio-logging as a Cake Tool #tool nuget:?package=rio-logging&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
rio-logging
A Serilog wrapper for .NET environments.
// include the riolog namespace
using riolog;
// =======> Using riolog
// invoke the static factory method, SetupAndStart()
// pass in a bit flag to define what outputs the logger should use
var log = InternalLogFactory.SetupAndStart(Output.All);
// example usage
log.Debug("Debug ");
log.Information("Information ");
log.Error("Error");
// manually invoke log.CloseAndFlush() at the end of your program's lifetime
// this method will invoke Dispose() on the logger, which will flush any pending log messages
log.CloseAndFlush();
// =======>
// include the riolog namespace
using riolog;
using Microsoft.Extensions.Logging;
// =======> Using riolog as Microsoft.Extensions.Logging.ILogger
// invoke the static factory method, SetupAndStart()
// pass in a bit flag to define what outputs the logger should use
// then invoke the AsLogger<T>() extension method to convert the Serilog.ILogger to a Microsoft.Extensions.Logging.ILogger
// replace type 'Program' with an appropriate type
var log = InternalLogFactory.SetupAndStart(Output.All).AsLogger<Program>();
// example usage, log in same manner, but with the ILogger API
log.LogDebug("Debug ");
log.LogInformation("Information ");
log.LogError("Error");
// manually invoke log.CloseAndFlush() at the end of your program's lifetime
// this method will invoke Dispose() on the logger, which will flush any pending log messages
log.CloseAndFlush();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Serilog (>= 3.1.0-dev-02078)
- Serilog.Extensions.Logging (>= 7.0.1-dev-10354)
- Serilog.Sinks.Console (>= 5.0.0-dev-00923)
- Serilog.Sinks.Debug (>= 2.0.0)
- Serilog.Sinks.File (>= 5.0.1-dev-00968)
- SeriLogThemesLibrary (>= 1.0.0.1)
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.0 | 238 | 5/10/2024 |