Logging with NLog in ASP.NET
Vložit
- čas přidán 19. 06. 2024
- Go to StudyCoding.org to subscribe to the full list of courses and get source code for projects.
Updated version of this course is studycoding.org
Logging with NLog in ASP.NET Tutorial for setting up nLog in an ASP.NET web app.
Very fast, clear and super useful tutorial, Shad!
Great way to teach Nlog, thanks for the detailed explanation Prof
Great tutorial Shad! More than I expected for a quick 23 min intro to NLog.
Glad you liked it! I would guess that you have some experience with working with nLog. Can you suggest any gaps in the presentation that viewers should look at next?
I like the way you explain the process, thanks
Really tnks, your class, is simple and really good, 2 days searching on documents and google for understand my error, 6 minutes of your class and, voilá its working, and with an plus I understood all configurations according my studies, I create more targets according my necessity to put 1 file per day, 30 days of duration of each file and more. YOU SAVE MY BONE AND MY TIME, God bless your steps man.
Great lesson! Easy to understand and follow steps.
Thanks!
Thanks Shad, this will help me a lot.
Perfect explanation! Thank you very much, ser! )
This was really helpful, thanks. The second "arg" to getLogger that you pass in is a string, and it seems that if it is there you just pass it on. But eventually it turns into a Logger type. Does the string name become that type, and is it implicitly converted? Or do you cast it somehow? I'm not making my own Logger, but I'm curious.
Great tutorial Shad!
I am going to take your code and a add thread-safety logic in your Singleton class.
Thanks mate
I would be interested to see your solution.
Thank you for making this video
Thanks for the idea... 🎉🎉🎉😊😊 Good explication
Amazing, thank you 🌹
Hello shad, thanks for these series, can this be used in a .NET Core 3.1 Razor Pages application?
I like how you kept the subject matter limited in scope by not introducing DI to the audience in this particular video. I suppose it would have detracted from the central message. Good work!
Thank you. This video helped me to start
Glad I could help
Great video, very time-saving, and easy to understand. How do we get to the next video?
Thanks Shad.
Great Video, thx
Hi Shad, I succeeded in setting up the singleton NLog in my project after watching this video, very clear tutorial, good job and thanks! The problem I am facing is when I run my tests in parallel, my log files sequences are not correct. So they are not categorised based on the test case I am testing.
You can probably add a "tag" to each log item so that you get categories in the log. Label each item as "db" , "login", "error" etc. Sort the items with a spreadsheet or better yet, connect nLog to a product that is designed to manage log messages. Here is one such tool used in another video: czcams.com/video/yMSsnItjtOQ/video.html
Thanks very much :D
"Intentionality created an error" i laughed that part so hard :D Btw appreciate dude helped a lot.
Mr Shad. I really liked the video. Could you please take the method of recording with the database? Thank you.
thank you teacher !! it is a great lecture, could i ask something? when we use Logger Function something like Info, debug and error. Are they excute another thread? because if those functions excute same thread. it has bottleneck.. because it has cost to go hardward to write..; T _T;
Thx!
Hi Shad, This great solution. I implemented simple before i was using ${callsite} but after using singleton it not working displaying singleton class. how to over come for this issue?
Thanks for the quality information. Would you say it is good/bd practice to save the logs to the application directory(publish directory). Thanks and much love from Germany
I would not recommend saving anything into the publish directory unless you want to share it with the public. Take a look at the Google "dorking" techniques for discovering unintentional data sharing. czcams.com/video/nDpy0eg2xK8/video.html
its impossible to edit te nlog.config file, it doesnt let me change anything
Hey I wanna create a target and rules in run time and format should be
Parent
|. |
Commonlog.txt. Custom folder
|
Custom logname.txt
But... why use C++/Java style "GetInstance()" syntax when you have (readonly) properties in C#?
I subscribe it but I didnot receive any source code
Kindly guide me with zerolog configuration
your videos are edited well, but you don't need to do this, why not increase font it will be easier than editing