PeriodicLogger 1.0.0

dotnet add package PeriodicLogger --version 1.0.0                
NuGet\Install-Package PeriodicLogger -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="PeriodicLogger" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PeriodicLogger --version 1.0.0                
#r "nuget: PeriodicLogger, 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 PeriodicLogger as a Cake Addin
#addin nuget:?package=PeriodicLogger&version=1.0.0

// Install PeriodicLogger as a Cake Tool
#tool nuget:?package=PeriodicLogger&version=1.0.0                

---Add these Appsettings:

"LogTracker": { "OrganizationId": "aec74b36-d2da-4cd4-9cd1-abde7d23553c", "ApplicationId": "f0d91e36-95c6-42fd-93be-2b2e7bc066d0", "ApiUrl": "http://localhost:5006/" }, "Seq": { "SeqServerUrl": "http://host.docker.internal:5341", "SeqApiKey": "FcUQ9ujzJGvFK7gvRkrj" }, "PeriodicLogger": { "SyncIntervalMinutes": 5 },

---region Register Logger // Create a level switch for controlling logging levels var levelSwitch = new LoggingLevelSwitch();

// Configure Serilog for real-time file logging with date in file name Log.Logger = new LoggerConfiguration() .MinimumLevel.ControlledBy(levelSwitch) .Enrich.FromLogContext() .Enrich.WithProperty("ApplicationName", builder.Environment.ApplicationName) .Enrich.WithProperty("EnvironmentName", builder.Environment.EnvironmentName) .WriteTo.Console() .WriteTo.File("logs/log-.txt", rollingInterval: RollingInterval.Day) // Real-time file logging with date .CreateLogger();

builder.Host.UseSerilog(Log.Logger);

---Register Dependencies builder.Services.AddHostedService<PeriodicLoggerService>(); // Register the background service for periodic logging builder.Services.AddSingleton(levelSwitch); // Register LoggingLevelSwitch as a singleton service

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
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.0 111 6/6/2024