APF.Core.Logger
8.0.0.1-Beta-02
This is a prerelease version of APF.Core.Logger.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package APF.Core.Logger --version 8.0.0.1-Beta-02
NuGet\Install-Package APF.Core.Logger -Version 8.0.0.1-Beta-02
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="APF.Core.Logger" Version="8.0.0.1-Beta-02" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add APF.Core.Logger --version 8.0.0.1-Beta-02
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: APF.Core.Logger, 8.0.0.1-Beta-02"
#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 APF.Core.Logger as a Cake Addin #addin nuget:?package=APF.Core.Logger&version=8.0.0.1-Beta-02&prerelease // Install APF.Core.Logger as a Cake Tool #tool nuget:?package=APF.Core.Logger&version=8.0.0.1-Beta-02&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Steps to integrate Loggly logger in .NET Backend
If the project is Handler:
- Add package reference of latest APF.Core.Logger package to the project.
- Function.cs file: Add below two lines to configure the logger:
This code will configure the logger with given log name as its source.var logName = Environment.GetEnvironmentVariable("CORE_ENVIRONMENT") + "-" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Name.ToLower(); serviceCollection.AddScoped<ICustomLoggerService>(provider => new CustomLoggerService(_configuration, logName)); </code>
- Now in Handler’s constructor, pass the dependency of ICustomLogger interface.
- Go to loggly and create source group with above tag using below steps:
- Login to loggly and go to Logs menu ⇒ Source Setup ⇒ Open ‘Source Groups’ tab.
- Click Add New ⇒ Give Name, desc & ensure to add Tag same as one we pass in code above (logname). ⇒ Save.
- Now on Logs ⇒ Log Explorer we can filter using this tag.
If the project is API project:
- Add package reference of latest APF.Core.Logger package to the project.
- Startup.cs file: Add below two lines to configure the logger:
This code will configure the logger with given log name as its source.var logName = Environment.GetEnvironmentVariable("CORE_ENVIRONMENT") + "-" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Name.ToLower(); serviceCollection.AddScoped<ICustomLoggerService>(provider => new CustomLoggerService(_configuration, logName)); </code>
- Now in controller’s constructor, pass the dependency of ICustomLogger interface.
- Next steps are same as handler project.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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.
-
net8.0
- Amazon.Lambda.Core (>= 2.0.0)
- AppFact.SerilogOpenSearchSink (>= 0.0.6)
- FluentValidation.AspNetCore (>= 9.2.0)
- Newtonsoft.Json (>= 13.0.1)
- Serilog.AspNetCore (>= 6.0.0)
- Serilog.Sinks.Loggly (>= 5.4.0)
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 |
---|---|---|
8.0.0.2-Beta-01 | 65 | 11/19/2024 |
8.0.0.1 | 91 | 10/14/2024 |
8.0.0.1-Beta-02 | 85 | 10/13/2024 |
8.0.0.1-Beta-01 | 94 | 9/9/2024 |
6.0.0.8-Beta-03 | 84 | 10/4/2024 |
6.0.0.8-Beta-02 | 60 | 10/4/2024 |
6.0.0.8-Beta-01 | 100 | 8/21/2024 |
6.0.0.7 | 259 | 7/29/2024 |
6.0.0.6 | 106 | 7/10/2024 |
6.0.0.5 | 91 | 7/10/2024 |
6.0.0.4 | 184 | 7/9/2024 |
6.0.0.3 | 108 | 7/8/2024 |
6.0.0.2 | 144 | 6/27/2024 |
6.0.0.1 | 101 | 6/25/2024 |
6.0.0 | 547 | 5/22/2024 |
# Changelog
## 8.0.0.1-Beta-02 - 2024-10-11
- Upgraded to .NET 8