LoggingWrapper 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package LoggingWrapper --version 1.1.0
                    
NuGet\Install-Package LoggingWrapper -Version 1.1.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="LoggingWrapper" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LoggingWrapper" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="LoggingWrapper" />
                    
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 LoggingWrapper --version 1.1.0
                    
#r "nuget: LoggingWrapper, 1.1.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.
#:package LoggingWrapper@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LoggingWrapper&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=LoggingWrapper&version=1.1.0
                    
Install as a Cake Tool

This Package is used to implement Custom Logging in the .net Core Solution.

As per current version i.e. 1.1.0, Serilogging is implemented as custom Logging.

For Implementing Seri Custom logging, Below steps need to be followed

  1. Add Nuget Package i.e LoggingWrapper 1.1.0 from Package Manager console in required projects. PM>Install-Package LoggingWrapper -Version 1.1.0

  2. In the startup project, add following in ConfigureServices method in Startup.cs Class

    1. services.AddScoped<ILogger, SeriLogger>() → This is used for handled logging and Exceptions

    2. services.AddMvc(options ⇒ { options.Filters.Add(new HttpResponseExceptionFilter()); });

       -> This is used for Unhandled Exceptions.
      
  3. Add below configuration in appsettings.json "Serilog": { "Using": [ "Serilog.Sinks.File" ], "MinimumLevel": { "Default": "Verbose"

    		}
    	  },
    		"LogSettings": {
    		  "LogPath": {LogPath}",
    		  "fileName": {FileName},
    		  "fileSizeLimitBytes": {FileSizeLimit},
    		  "retainedFileCountLimit": {FileCountLimit}
    		}
    
    	By Default MinimumLevel Should be Verbose -> Which is used to write all types of logs i.e. Debug/Information/Warning/Error
    	As per project requirement, Minimum Level can be changed to Debug/Information/Warning/Error to log specific logs
    
    	LogPath-> It is location where you need to store logs.
    
    	FileName -> It is the name of text file in which logs will be stored.File will be name with mentioned name + [Year(yyyy) +  
    	Month(MM) + Day(dd)
    
    	FileSizeLimit -> It is the no of bytes, a file size should be.If file size increase above the limit, new file will be created with filename_001,filename_002 etc.
    
    	FileCountLimit -> This field is used to for backup of file for how mnay days.e.g. If 31 days are mentioned in file,after 31 days, all files will be deleted.
    
    
    	1. To use methods for Logging in class file, first import LoggingWrapper namespace
    	2. Declare  variable  for ILogger interface (e.g. ILogger logger)
    	3. Using depedency injecton,initizalize logger variable in constructor.
    
    	Method for Logging
    
    	After initizalization,use below methods for logging
    
    	1. Debug ->      logger.WriteLog(LogType.DEBUG, message);
    	2. Info ->       logger.WriteLog(LogType.Info, message);
    	3. WARN ->       logger.WriteLog(LogType.WARN, message);
    	4. FATAL ->      logger.WriteLog(LogType.FATAL, message);
    	5. Exception ->  logger.WriteError(ex);
    
Product 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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
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.1.6 1,452 9/14/2020
1.1.1 615 9/14/2020
1.1.0 753 7/19/2020
1.0.4 622 7/19/2020