Digital Knack
Digital Knack
  • 172
  • 1 625 415
How to implement Serilog in Asp.Net Core 8.0
In this tutorial you will learn how to implement serilog logging in asp.net core 8.0.
Here is the appsettings.json code:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"Serilog": {
"Using": [ "Serilog.Sinks.File" ],
"MinimumLevel": {
"Default": "Debug"
},
"WriteTo": [
{
"Name": "File",
"Args": {
"path": "D:\\logs\\APIlog-.log",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss zzz} {CorrelationId} [{Level:u3}] {Username} {Message:lj}{Exception}{NewLine}"
}
}
]
},
"AllowedHosts": "*"
}
Here is the code snippet to paste in Program.cs:
var _logger = new LoggerConfiguration()
.ReadFrom.Configuration(builder.Configuration)
.Enrich.FromLogContext().CreateLogger();
builder.Logging.ClearProviders();
builder.Logging.AddSerilog(_logger);
Переглядів: 466

Відео

Mastering UWP: Creating and Installing Your App Package Tutorial
Переглядів 538 місяців тому
In this video, I have explained how to create an App Package for your UWP app and also how to install it on your system.
A reference to 'Dynamics.AX.SourceDocumentationType is missing | Solved 100%
Переглядів 83Рік тому
Today I am going to resolve an errro in d365 FO: A reference to 'Dynamics.AX.SourceDocumentationTypes, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is required to compile this module. Solution: Add reference to Source Documentation Module to your new custom model in which you are working. Thanks for watching, Please subscribe my channel. If you have any questions or queries, write the...
Class 'SRSReportParameterAttribute' was not found. D365 FO | Solved 100%
Переглядів 127Рік тому
In this video I am going to resovle an error which is: Class 'SRSReportParameterAttribute' was not found. Are you missing a module reference? or Class 'SysOperationLabelAttribute' was not found. Are you missing a module reference? Both erorrs are mostly encountered if you are working in your custom model and your model does not have required references to the existing models. For example in cur...
Error: "dotnet : Could not find any project in `C:\\**." | D365 FO | Solved 100 %
Переглядів 2,4 тис.Рік тому
Today I am going to resolve another error that you might face when trying to install a nuget package from Package Manager Console. The error is: "dotnet : Could not find any project in `C:\ ." Thanks for watching, Please subscribe my channel. If you have any questions or queries, write them in comments below or mail me at: abbas.thegreat5@gmail.com Audio Used in Video: Song of mirrors Credits: ...
Query is not valid | D365 FO | Solved 100%
Переглядів 238Рік тому
In this video I haved resolved an error that you might face in D365 FO which is : "The query is not valid" Thanks for watching, Please subscribe my channel. If you have any questions or queries, write them in comments below or mail me at: abbas.thegreat5@gmail.com Audio Used in Video: The Coldest Shoulder Credits: UA-cam free music library
How to add swagger in Asp.net core project
Переглядів 2,4 тис.Рік тому
Today I am going to teach "How to add swagger in Asp.net core project" Follow these 4 steps: 1: Install the Swashbuckle.AspNetCore NuGet package: 2: Add the Swagger generator to the services in the Startup.cs file: 3: Enable the middleware to serve the generated Swagger as a JSON endpoint and the Swagger UI: 4: Set up the launch url in launchSettings.json: For example, "localhost:5001/swagger"....
How to delete node_modules folder from any js, react project from cmd
Переглядів 1,9 тис.Рік тому
In the tutorial, I have shown how to delete node_modules folder from any java script or react js project simply from command line. Deleting node_modules folder from command line takes less time than deleting in manually from UI by using mouse. Thanks for watching, Please subscribe my channel. If you have any questions or queries, write them in comments below or mail me at: abbas.thegreat5@gmail...
How to create separate folder in outlook mailbox
Переглядів 582Рік тому
In this tutorial, I have explained how to create a separate folder in outlook and segregate your emails based on subject and other parameters. Thanks for watching, Please subscribe my channel. If you have any questions or queries, write them in comments below or mail me at: abbas.thegreat5@gmail.com Audio Used in Video: The Coldest Shoulder Credits: UA-cam free music library
The term 'Connect-PnPOnline' is not recognized | SharePoint Power shell Issue Resolved
Переглядів 1,1 тис.Рік тому
Today I am going to resolve an error that we face while running commands in windows powershell: The term 'Connect-PnPOnline' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Lets have a look first Now run the follwoing command to install pnp module: Ins...
How to use Virgoin POS
Переглядів 188Рік тому
0:00 Introduction-File Menu 0:26 Master Menu 16:22 Purchases Menu 22:23 Sales Menu 38:16 Financials Menu 50:36 Price Search 50:58 Reports Menu 57:31 Settings Menu To download the POS visit website: www.virgoin.com/2022/08/pos-link-httpsdrive.html
How to Update/Upgrade Node Js Version on Windows
Переглядів 27 тис.Рік тому
In this video, I have explained How to Update Node Version on Windows. Just follow the easy steps in the video. Link to Download Node Js: nodejs.org/en/download/ Thanks for watching, Please subscribe my channel. If you have any questions or queries, write them in comments below or mail me at: abbas.thegreat5@gmail.com Audio Used in Video: Song of Mirrors Credits: UA-cam free music library
System.InvalidOperationException | IServiceCollection.AddRazorPages | Resolved
Переглядів 3,3 тис.Рік тому
In this video I have resolved the following error that you might face while making an application in asp.net mvc and using Razor Pages in your application. The error is: System.InvalidOperationException: 'Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddRazorPages' inside the call to 'ConfigureServices(...)' in the application startup ...
How to Schedule Databases Backup in SQL Server
Переглядів 81Рік тому
In this video, I have explained practically How to Schedule Databases Backup in SQL Server. Thanks for watching, Please subscribe my channel. If you have any questions or queries, w rite them in comments below or mail me at: abbas.thegreat5@gmail.com
Your target project doesn't match your migration assembly || Solved 100%
Переглядів 978Рік тому
In this video I have resolved an error that you might face while applying migrations in entity framework core. Thanks for watching, Please subscribe my channel. If you have any questions or queries, w rite them in comments below or mail me at: abbas.thegreat5@gmail.com Audio Used in Video: Song of Mirrors Credits: UA-cam free music library
How to install XML tools in Notepad++
Переглядів 8 тис.2 роки тому
How to install XML tools in Notepad
How to Display Line Numbers in SQL Server Management Studio || Query Editor
Переглядів 9952 роки тому
How to Display Line Numbers in SQL Server Management Studio || Query Editor
How to Start SQL Server Agent - A Beginner's Guide
Переглядів 6 тис.2 роки тому
How to Start SQL Server Agent - A Beginner's Guide
How To Download,Install and Use Handbrake software | Step by Step guide
Переглядів 1742 роки тому
How To Download,Install and Use Handbrake software | Step by Step guide
How to Download and Install Sql Server 2019 | Step by Step guide. | SSMS
Переглядів 842 роки тому
How to Download and Install Sql Server 2019 | Step by Step guide. | SSMS
Could not install package | targets '.NETFramework,Version=v4.5.2' , v4.5 | Solved
Переглядів 13 тис.2 роки тому
Could not install package | targets '.NETFramework,Version=v4.5.2' , v4.5 | Solved
How to use xsd tool | xsd.exe | Convert xsd schema to class
Переглядів 7 тис.2 роки тому
How to use xsd tool | xsd.exe | Convert xsd schema to class
the current branch master has no upstream || git || Solved 100 %
Переглядів 4,5 тис.2 роки тому
the current branch master has no upstream || git || Solved 100 %
GraphQL || ASP.NET Core 6.0 || Visual Studio 2022 || 7 Mins
Переглядів 4,6 тис.2 роки тому
GraphQL || ASP.NET Core 6.0 || Visual Studio 2022 || 7 Mins
yarn.ps1 is not digitally signed | yarn.ps1 cannot be loaded in vs code
Переглядів 7 тис.2 роки тому
yarn.ps1 is not digitally signed | yarn.ps1 cannot be loaded in vs code
How to export attendance from Zktecho Attendance Machine
Переглядів 7 тис.2 роки тому
How to export attendance from Zktecho Attendance Machine
How to file your tax in fbr iris for salaried person in Pakistan
Переглядів 1862 роки тому
How to file your tax in fbr iris for salaried person in Pakistan
How to set paper size in any thermal printer?
Переглядів 291 тис.2 роки тому
How to set paper size in any thermal printer?
A Network related or instance specific error Sql Server
Переглядів 1532 роки тому
A Network related or instance specific error Sql Server
"TypeError: require(...).listen is not a function" in socket.io
Переглядів 3,6 тис.2 роки тому
"TypeError: require(...).listen is not a function" in socket.io

КОМЕНТАРІ