C# Logging with Serilog and Seq - Structured Logging Made Easy

Sdílet
Vložit
  • čas přidán 19. 06. 2024
  • Structured event logging is so much more than just writing a message to a file. Since .NET Core natively supports structured event logging, I wanted to introduce a logger that takes advantage of these additional features. Serilog is an easy to configure and easy to use logging system that you can plug into a .NET Core project within minutes. Today we are going to configure Serilog, see how to use it in a basic logging scenario, then take advantage of the structured logging by hooking up a visual event sink called Seq.
    Mailing List: signup.iamtimcorey.com/
    Intro to Logging: • Logging in .NET Core 3...
    Getting Started with Docker: www.iamtimcorey.com/p/getting...
    Source Code: leadmagnets.app/?Resource=Log...
    0:00 - Intro
    1:29 - Getting started: ASP .NET Core application
    4:18 - Built in logging system crash course
    8:08 - Exceptions in log messages (built in)
    10:27 - Additional information in log message: variables in the log message (built in)
    13:42 - Setting up Serilog
    17:33 - Serilog NuGet references and configuration
    21:38 - Logging application start and crash with Serilog
    24:35 - Use Serilog over default built in logging system
    25:00 - appsetings.json
    29:47 - Serilog Enrichers: settings and NuGet references
    32:27 - Writing the log messages to Console
    34:29 - Logging request messages
    38:11 - Writing the log messages to text file
    40:49 - Structured logging: writing the log messages to json file
    46:42 - Seq
    48:39 - Setting up Seq with docker: NuGet reference, configuration, docker setup
    59:15 - Logging with Seq
    1:02:34 - Summary and concluding remarks

Komentáře • 397

  • @dustinbishop9572
    @dustinbishop9572 Před 4 lety +49

    Tim Corey you are the man, there so much outdated info on serilog on the net

  • @jrandallsexton
    @jrandallsexton Před 4 lety +13

    Fantastic tutorial - especially running Seq on Docker. Thank you.

  • @gagwithgaffer8385
    @gagwithgaffer8385 Před 4 lety +1

    Watching this again 6 months later and it really helped me figure our the Seq sinks setup for a new project, thanks Tim :)

  • @Lior_Banai
    @Lior_Banai Před 4 lety

    Thanks for this. I wanted to add Serilog to my open source Analogy log viewer that supports many formats and now I can learn better how it works

  • @marcturelles7684
    @marcturelles7684 Před 4 lety +3

    I used to watch TheNewBoston and his tutorials and what have you. Then I found you. I have recommend you to so many people who want to get into c#. Keep up the fantastic videos!

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      Awesome! I appreciate the recommendations.

  • @numinaoneiron1655
    @numinaoneiron1655 Před 4 lety +5

    Great Video...I really appreciate your videos especially when you introduce new nuget packages that I didn't know before.

  • @zashtys
    @zashtys Před 2 měsíci

    Man idk what I'd do without you, I've gotten into C# coding thanks to you! Been watching all of your videos trying to follow your practices. Thank you!

    • @IAmTimCorey
      @IAmTimCorey  Před 2 měsíci

      I'm glad my content has been so helpful.

  • @kamilzakiev989
    @kamilzakiev989 Před 3 lety +3

    Thanks for your work, Tim!
    Your explanation skills make every point that you cover clear and logic, it's just a pleasure to watch your tutorials!

  • @vivekdesai8500
    @vivekdesai8500 Před 4 lety

    I was just looking for info on Serilog and found you just uploaded today. Thank you!

  • @hannanguyen4418
    @hannanguyen4418 Před rokem

    Awesome Tim! I have learned a lot about Serilog. Really appreciate your work.

  • @shabi9
    @shabi9 Před 3 lety +2

    this was great man, it was the most clear course i saw recently.
    i will now sign up to become a patron, keep it up.

  • @A4amenvi
    @A4amenvi Před 4 lety

    Thanks for saving me hours of googling.
    With the right amount of Docker lectures.
    Please do something on docker and docker compose for us probably with graylog installation.
    Thanks

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      Awesome! I'm glad it was so helpful. As for Docker, I've shown it off a few times on this channel but I also built a course covering how to get started well with it: www.iamtimcorey.com/p/getting-started-with-docker

  • @user-gd2um5ox6w
    @user-gd2um5ox6w Před rokem

    Hi Tim, your tutorial makes the concept so easy and clear, thanks a lot bro

  • @Ron-R
    @Ron-R Před 4 lety

    Couldn't asked for anything more, great job.

  • @nvdshams
    @nvdshams Před 3 lety

    Tim that is an awesome tutorial. I never thought it would be that easy.

  • @davidchiles7028
    @davidchiles7028 Před 3 lety

    Hi Tim, great article as with all of you articles :) Thank you.

  • @faridlorestani56
    @faridlorestani56 Před 4 lety

    thank you for your great videos. they so practical and filled with details

  • @sevenrow
    @sevenrow Před 4 lety

    Thanks, great tutorial! I ended up using Serilog with InvisionLog instead of Seq. No setup hassle so you can start logging right away

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      Excellent!

    • @Benjaminmlynek
      @Benjaminmlynek Před 2 lety

      How did you configure InvisionLog in Appsettings? I can't seem to find anything about that :)

  • @alekseev74
    @alekseev74 Před 2 lety

    Sir, i am new to Serilog. After wathching this video now i know everything what i need for my project. Thank you!

  • @jerrydsta1056
    @jerrydsta1056 Před 2 lety

    fantastic intro into Serilog. thank you so much.

  • @steing.pedersen5070
    @steing.pedersen5070 Před 4 lety

    Thank you for sharing this. I like your approach to being a teacher. Keep on going.

  • @aminebelbahar1086
    @aminebelbahar1086 Před rokem

    Thanks for this awesome tutorial. It helped me a lot with switching my project to Serilog

  • @baris7971
    @baris7971 Před 3 lety

    This is so valuable, thank you very much for this video i was able to adapt this and now have a centralized logging server for my Applications. i cant wait to try more things out with this and how Seq comes up comparing with Application Insights (much pricier, especially if you dont know exactly what are you doing).

  • @vikasanand4963
    @vikasanand4963 Před 3 lety

    very nice information Tim. Serilog is really a very important tool. Also you said a very important point at the end - "Logging can be very powerful as long a you use it. If you don't use it why bother" -:)

  • @idgafa
    @idgafa Před 4 lety

    Setting the playback speed to 2x works best. Thanks Tim.

  • @davidpccode
    @davidpccode Před 4 lety

    Woooooowwwww What an amazing explanation!!! Thank you so much.. this is a Loggin master class

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      You are most welcome. Thanks for watching.

  • @afgdfdgdfddf42
    @afgdfdgdfddf42 Před rokem

    Great videos. I bought your book after discovering your channel. Thank you!

    • @IAmTimCorey
      @IAmTimCorey  Před rokem

      You are welcome. What book are you talking about, though?

  • @vladimirp.chibas3190
    @vladimirp.chibas3190 Před 2 lety

    Very Nice, Thanks for your work, Tim!

  • @saidakhmedagitaev
    @saidakhmedagitaev Před 4 lety

    really appreciate what you do, keep it up!
    thank you!

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      You are most welcome. Thanks for watching.

  • @wowDepressive
    @wowDepressive Před 4 lety

    Hi Tim really appreciate this video. Good job. Thanks.

  • @cakdham4607
    @cakdham4607 Před 4 lety

    Nicely done as always.. thanks tim

  • @ruslansafroniuk65
    @ruslansafroniuk65 Před 4 lety

    Really helpful tutorials. Thanks a lot for your content

  • @henryjao-ti7cv
    @henryjao-ti7cv Před rokem

    Awesome video, thanks for your contribution.

  • @salihkarabilo7005
    @salihkarabilo7005 Před 3 lety

    Great tutorial! So informative! Thanks

  • @sicro1000
    @sicro1000 Před 3 lety

    Excellent video, thanks Tim

  • @sunilanthony17
    @sunilanthony17 Před 4 lety

    This is awesome. Love it!

  • @prashantvishnoi2878
    @prashantvishnoi2878 Před 4 lety

    Amazing explanation. Loved it.

  • @chrisleebear2600
    @chrisleebear2600 Před 2 lety +1

    Please keep doing what you are doing, your learning videos are top notch. U are truly a gem in the c# community.

  • @jhcarr830
    @jhcarr830 Před 3 lety

    Thanks Tim, good information!

  • @macfarmw
    @macfarmw Před 3 lety +1

    Very nice! I learned a lot about Serilog. I appreciated the explanation for background items, like to identify the official Serilog packages vs the random ones.

  • @mgbaraka1
    @mgbaraka1 Před 2 lety

    Amazing, informative video, thank you.

  • @harshith5078
    @harshith5078 Před 4 lety

    Great vid really helps a lot!

  • @mdmahmudulhasan2620
    @mdmahmudulhasan2620 Před 4 lety

    Love it, you are a great tutor.

  • @AnasAlQudah
    @AnasAlQudah Před 4 lety

    Many Thanks , Very useful video.

  • @Mauricio.Solorzano
    @Mauricio.Solorzano Před 3 lety +1

    Love this! Thank you!

  • @Tregsg
    @Tregsg Před 3 lety

    Really good tutorial!
    It's works!

  • @hassansoleimani1061
    @hassansoleimani1061 Před 2 lety

    Tim, you are the best teacher in the world

  • @northshorepx
    @northshorepx Před 3 lety

    Excellent tutorial mate.

  • @anrodse
    @anrodse Před 4 lety +3

    Great tutorial! (as usual)
    Only thing I miss is a list of installed packaged in description. I've seen the whole video and now I need to review it to write down needed nuget packages.

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      If you create a list of them, let me know in a new comment (I don't see threaded comments) and I'll review them and post it in the description for the next person.

    • @akashjadhav5093
      @akashjadhav5093 Před 2 lety

  • @mohammadanas3320
    @mohammadanas3320 Před 2 lety

    Your videos are the best man!!

  • @Michael-zn4oq
    @Michael-zn4oq Před 2 lety

    This looks awesome 😍

  • @Passta357
    @Passta357 Před 2 lety

    very informative, thank you

  • @mohamedasem-vp1ni
    @mohamedasem-vp1ni Před rokem

    Great Work!

  • @mesharialturki5226
    @mesharialturki5226 Před 3 lety +1

    Hi, Thank you so much for this amazing video, I just have one question, is it possible to run multiple projects with one Seq to log all actions?

  • @berhank
    @berhank Před 3 lety

    53:53 - when you want to make fonts bigger - HOLD CTRL and scroll mouse wheel (UP/DOWN) to make font bigger/smaller. ;)
    Good Tutorial as always Tim!

    • @tomthelestaff-iamtimcorey7597
      @tomthelestaff-iamtimcorey7597 Před 3 lety

      Thanks for sharing the tip!

    • @IAmTimCorey
      @IAmTimCorey  Před 3 lety

      Yep, that affects the zoom on the code itself. It doesn't affect the menus or other windows, though.

    • @berhank
      @berhank Před 3 lety

      @@IAmTimCorey I don't understand though how that matters, and since you mention it, it must mean something..
      I thought the point was to make what you type bigger so it can be easier to read, no?
      What menu do I need to be bigger in PowerShell ? Thanks for great tutorials as always!!

  • @al-omdaahmed3191
    @al-omdaahmed3191 Před 3 lety

    As usual a great tutorial from my favorite teacher
    thank you a lot for your time and effort
    but you said in the "Intro to Logging" tutorial, logging is expensive you need to do it in the background
    any suggestions on how to do that
    does use async/await is efficient to do so ???
    also is there any free tool for logging has the same functionality as seq

  • @mohinderkaur6671
    @mohinderkaur6671 Před rokem

    Very Helpful!

  • @tumim8403
    @tumim8403 Před 3 lety +1

    Lovely. I would like to know if I can have different logging files. For instance one for errors and the other for any other information. This means I would want to have a separate file for errors

  • @CapnCoCo1
    @CapnCoCo1 Před 3 lety

    Thaks for this awesome video. Running into an issue where I would like to turn off a particular context that just throws out grabage error level messages. Any idea how to do this? For now i set the override to fatal.

  • @hosseinmoradi685
    @hosseinmoradi685 Před rokem

    Thank you it helps👍👍👍👍

  • @amjster
    @amjster Před 4 lety

    Hey Tim. I am loving your videos. Keep up the good work. Just one comment though, can you zoom into the code editor when making these great tutorials so I can see the code better? I'm watching this on my phone and can *just* about make out what you are typing. Many thanks

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      I do what I can but with so much code to show, it is not usually practical to zoom in to that level.

  • @TheAngelOfDeath01
    @TheAngelOfDeath01 Před 2 lety +1

    Serilog is one of the things every person new to programming should learn out of the gate, especially structured logging, because it makes ones coding life soooo freaking much easier. And you are right about their documentation -- it is superb.

  • @nadaralpenidze9549
    @nadaralpenidze9549 Před 3 lety

    Thank you so much

  • @sanjayban12
    @sanjayban12 Před 3 lety

    Thanks for the video. I need help in rolling out the log file . once it reaches the size of say 2 MB then create a new log file. How to achieve that please help.

  • @gingerbreadman1234
    @gingerbreadman1234 Před 4 lety +1

    Dude, I love you.

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      Thanks!

    • @gingerbreadman1234
      @gingerbreadman1234 Před 4 lety

      @@IAmTimCorey Maybe you could make an 'Education' type page on LinkedIn? I record my certs there, Udemy, Pluralsight etc ... but to reference youtube doesn't carry much weight. So if you set up a page of type education I could reference it to you (and then so could others!). Example: www.linkedin.com/in/robertmulpeter/

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      I just launched a LinkedIn learning page. I'll make it prettier in the coming weeks but here you go: www.linkedin.com/company/iamtimcorey

  • @samiboy53
    @samiboy53 Před 3 lety

    This is a great video!!! I'm also concerned about how to maintain the logs so that they don't take a huge amount of space and then I run into trouble with my IT

  • @ArunaRanatunga
    @ArunaRanatunga Před 3 lety

    Tim, how can we create logs per each call and how can I define custom path. Ex. file name with {production}/{date}/{guid}.txt

  • @randyriegel8553
    @randyriegel8553 Před 4 lety

    I used to use NLog to write errors to text files or database table. After watching this I just upgraded the new application that Im working to Seq with Serilog. I'll be checking out other sinks and stuff because it's so easy the way you explained it just to set up sinks in the appsettings.json file. That's awesome.

  • @chrisdaly6890
    @chrisdaly6890 Před 4 lety

    Great tutorial. I was wondering where I could get information on how to use Serilog with a .NET Core console app, you said in the video that you have to do things differently than for a web app?

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety +2

      I demonstrate that in my Foundation in C# module 7 course, but I don't think I did it on this channel yet. They have made it easier with HostBuilder now. Maybe I'll add that to my suggestion list.

  • @TheRealCAPerry
    @TheRealCAPerry Před 3 lety

    That's a great tutorial you have there. It's just a shame I don't think I could get my organisation to grab a paid subscription to Seq.
    In the meantime, I'll plod on with the Serilog mssqlserver sink, and see if I can figure out how to filter out sensitive data with it.

    • @IAmTimCorey
      @IAmTimCorey  Před 3 lety +1

      Maybe show them the benefits of Seq and how it will improve efficiency. Sometimes, showing how much an item will save you compared to how much it costs can be beneficial (I know it won't always).

  • @cb6276
    @cb6276 Před 4 lety

    How did you know I was going to need this three days later? Just learned about Serilog/Seq today and BOOM! Tim Corey video.
    EDIT: Question. If I set my Default minimum level to "Warning", can I put an override for my own namespace to be Information? It's not working so I'm curious if that's possible at all.

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety +1

      I don't believe it works that way. The global is the minimum level so you would need to go the opposite way and set everything to information and then set all namespaces but yours to warning.

  • @pbutler1983
    @pbutler1983 Před 4 lety

    Tim, do you recommend using the built in .Net core logging in your code and then hooking up serilog integration with it at the end?

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      I definitely recommend you put logging in your application. What you choose to log to can change over time. You can start with just the console and move to Seq for production. That would be a good option.

  • @Baby4Ghost
    @Baby4Ghost Před 3 lety

    Loved the vid, good info! I did have a question thou, how about having multiple clients logging to Seq?
    But after some research I connected the dots:
    - Docker: you can mount multiple volumes (using the v: multiple times)
    - Seq: creating API keys in the Settings-page (with Applied Property: ApplicationName) and consuming it in the clients
    - Seq: in the overview you can use Signals > Application = 'ApplicationName' to filter on each client
    Not that advanced but I guess not everyone will find it useful. But seeing web services are becoming very common now, it might be nice to know.

    • @IAmTimCorey
      @IAmTimCorey  Před 3 lety +1

      Thank you for sharing what you found.

  • @galaxiegalaxie5003
    @galaxiegalaxie5003 Před 3 lety

    Thanks, 😁Could you also do video about serilog with elastic search,kibana and your opinion etc

    • @IAmTimCorey
      @IAmTimCorey  Před 3 lety

      I will add it to the list. Thanks for the suggestion.

  • @imavalverde
    @imavalverde Před 2 lety

    Incredible content Tim! Thank you.
    Wanted to understand if you ever mixed file logging with Seq.
    Let me explain, ELK typically is used with file beat so that it could tail docker logs and add them to Elastic.
    I am wondering if you ever implemented that with Seq.
    I wanted to keep file logging but having some kind of file beat reading them and putting them in Seq.

    • @ahmedifhaam7266
      @ahmedifhaam7266 Před 10 měsíci

      Am interested in this as well, how'd yours go

  • @levzak
    @levzak Před 3 lety

    Thank you for the great video! I have a question: how to log to separate sinks different messages using different templates. For instance: console, two files, and logentries. Thank you

    • @IAmTimCorey
      @IAmTimCorey  Před 3 lety +1

      You can define what gets written to each sink in the configuration file. You would need to look up the way to configure each sink.

  • @zangetsu2k8
    @zangetsu2k8 Před 3 lety

    I'm trying to find info on how to implement this with .net core 3 wpf app. documentation is lacking, and I'm not sure where to start as my wpf application doesn't have a startup.cs...

  • @tuoilevan6432
    @tuoilevan6432 Před rokem

    thank you

  • @maverickcalibre4142
    @maverickcalibre4142 Před 3 lety

    Hi Tim,
    Thanks for this wonderful tutorial. I have a question for you.
    How can we turn off logging in appsettings either for .net core logging or if using Serilog, how to turn off a particular sink in appsettings file ?

    • @IAmTimCorey
      @IAmTimCorey  Před 3 lety

      Usually you do this through the appsettings.json file by setting the threshold to off or to a high value.

  • @girornsveinsson7970
    @girornsveinsson7970 Před 4 lety

    Great video. The seq really looks like a powerful tool so thank you for introducing that here. As you you are here working with application json config I am curious how to work with the application.development json. Do you cover that somewhere in your videos?

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      When dealing with the config automatically set up for you in ASP.NET Core, I don't believe you need to do anything to get that to work. If you are setting up where it pulls from manually, you just need to add that to the configuration setup in the startup.cs file. It is a pretty slick system. You can add in Azure Key Vault as well.

    • @girornsveinsson7970
      @girornsveinsson7970 Před 4 lety

      @@IAmTimCorey So would you do something like this:
      string jsonConfig;
      #if (DEBUG)
      jsonConfig = "appsettings.Development.json";
      #else
      jsonConfig = "appsettings.json";
      #endif
      ?

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      No, you add both to the config options and you don't worry about the #if statement. The only time you would need that #if statement is if you were manually adding the files instead of configuring it automatically. The system looks for the json file associated with where the item is (in a development environment or a production environment) based upon a flag that is set. If it is not set, it is in release mode. Visual Studio sets it to development. Either way, you wouldn't add the dev version instead of the main version, you would add both because the dev version should just override settings that need overriding. Think of the config options like CSS in that settings in one file can override the other based upon order.

  • @dhanasekar370
    @dhanasekar370 Před 3 lety

    Can i use serilog in production? Its paid one or free open source ?

  • @leroylimll
    @leroylimll Před rokem

    Hi. Great video!
    Just wondering do you have a sample that starts from a Console Application?

    • @IAmTimCorey
      @IAmTimCorey  Před rokem

      Nope, but most of the code will be the same.

  • @snehpanchal533
    @snehpanchal533 Před 4 lety

    Awesome man Awesome , You Are just awesome.. It is not like you cant get code and explanation of serilog on internet , but the way you have explained like - how well structured manner serilog can be implemented and whats the way you should follow to implement serilog in the enterprise level application , thax man. BTW I have sent you mail for source code. I hope I'll get the reply soon. :-)

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      I'm glad you are enjoying it. I did get your email but haven't responded yet. I'm working through a backlog of email (I've been putting off responding while I record a course).

  • @Cralis1
    @Cralis1 Před 4 lety

    This is a fantastic video on Serilog and logging in general. Thanks. My question would be performance impact of Serilog. Is there anything significant? I'm hoping it's asyncronous. Fire log event and continue? And then when applying Seq - is it OK to host the SEQ server on a different machine? Would this cause a performance issue - as it posts to a URL. I host a site in a shared hosting environment where I may not be able to install Seq. Can I host that on different infrastrcuture and just pass the URL in appsettings.json?

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      As always, verify your assumptions but Serilog is very efficient and should not cause a noticeable performance hit on your application unless you are logging expensive things rapidly. As for hosting Seq, you can host it wherever you want. Network latency will be a factor but usually not much of one.

  • @lukaszluczko
    @lukaszluczko Před 4 lety +1

    NLOG rules :-) Greate video!!!

  • @rohanrvs
    @rohanrvs Před 3 lety

    Hey Tim. Thanks for this great video. I have 2 question.
    1. Does logging so much data will have any impact on the application performance.
    2. Can we configure logging like turn logging on and off whenever we need it or activate/deactivate certain logs e.g. Error logging should always be ON and other logs like Information or Warnings can be activated or deactivated whenever there is a need. I mean can this be handled in the appsettings.json itself or do we need to write a logic.

    • @IAmTimCorey
      @IAmTimCorey  Před 3 lety +1

      It depends on what you mean by "so much information". You get to choose how much to log. This leads into your second question - you get to choose at runtime what log level to capture. For instance, normally you would capture just warning, error, and critical. However, if an app was having an issue, you could drop the level to information, so you capture more messages and get a better picture of your app. If an entry isn't being recorded, it has practically no impact on your system. My recommendation is to only log what you are going to use. You put all of the log statements into your code to log everything you might need, but then only capture what you will actually read.

  • @sodreigor
    @sodreigor Před 2 lety

    At 39:25 can we set a path that's agnostic of weather it is windows or Linux?

  • @prem-rijal
    @prem-rijal Před 4 lety

    This is the fantastic tutorial. I learnt how to use serilog using this video. Apart from that, I wanted to write the log to console in development but to the text file in the production using the same appsettings. Currently, it writes files in both location with appsettings configuration. How can I control this? Do you have any example of the implementation?

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      You could put one configuration in appsettings.developer.json and the other in appsettings.production.json. Then it should do what you want.

  • @lrakhman
    @lrakhman Před rokem

    Hello. Is there a way to send logging information from SQL server to Seq?

  • @richardkerr2009
    @richardkerr2009 Před 4 lety

    Hi Tim, I've been following along with the TimCo Retail Manager series and staring to build my own WPF app using the principles you''re using (Caliburn Micro). I'm trying to get my head around how to use SeriLog and register it for use in my ViewModels. Would the SimpleContainer be the way to go or do I need to look at AutoFac?

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      SimpleContainer should work just fine.

    • @richardkerr2009
      @richardkerr2009 Před 4 lety

      @@IAmTimCorey I'll keep trying with SimpleContainer and see how I get on. Thanks

  • @octavianbreazu8486
    @octavianbreazu8486 Před 3 lety

    Hi Tim! Excellent tutorial but he most I like is the teaching style :-)
    I have big question though: my project is a webAPI using Core 5. Working fine with no errors before watching your tutorial. Applied your settings and run again with no problems or errors I can see. However, no log file (text or json) is generated or console messages to be seen. It must be an obvious reason but I cannot see it. Any idea?
    Thanks again.

    • @IAmTimCorey
      @IAmTimCorey  Před 3 lety

      Check your appsettings.development.json file to see if you are filtering out more data there. That's a common issue.

  • @talcon8747
    @talcon8747 Před rokem

    Another amazing video, you have made my learning so much easier!

  • @willci2905
    @willci2905 Před 3 lety

    hey tim, i'm working on a project and want to use serilog by writing it to files with an accurate time stamp for each action have any tips?

    • @IAmTimCorey
      @IAmTimCorey  Před 3 lety

      Serilog can write a timestamp for each log statement without an issue.

  • @MrOneWorld123
    @MrOneWorld123 Před rokem

    Are there (maybe less fancy) Open Source alternatives to Seq that also visualize structured logs? We really hesitate to bind us to an 8000 USD yearly contract.

  • @LizaHossain-xo7iy
    @LizaHossain-xo7iy Před rokem +1

    Awesome!
    I would like to add additional columns, such as 'Test1' and 'Test2,' to a SQL Server database. I also aim to insert data into these columns using a Logger. Could you please suggest a way for me to achieve this?

  • @raksmey7124
    @raksmey7124 Před 4 lety

    can you tell me how we can enable the blue line that it select he first text in the small box .. i mean that when we write something then that small box appear with method variable class etc

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      Can you give me a time code in the video where you saw this? Sorry, I'm not quite sure what you are asking for.

  • @postnoaut430
    @postnoaut430 Před 4 lety

    Excellent Tutorial.. Thanks a ton.. is it possible to see the xml version of the settings shown in this video for .Net Framework wpf app?

  • @avitwito1734
    @avitwito1734 Před 4 lety

    Thank for the video. Maybe you could help on a problem im having.
    I have many uses in ILoggerFactory which im using in startup to inject logger to many projects which my main project is using. When removing microsoft logging and only using serilog it doesn`t know ILoggerFactory andi cant compile the project

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      You should be able to add Serilog to a ILoggerFactory: csharp.hotexamples.com/examples/-/ILoggerFactory/AddSerilog/php-iloggerfactory-addserilog-method-examples.html

  • @ahilathanarasu2413
    @ahilathanarasu2413 Před 4 lety

    Hi Tim..I would like to know which is better whether SeriLog or NLog to log asp.net core web application info and error to the SQL server database

    • @IAmTimCorey
      @IAmTimCorey  Před 4 lety

      I wouldn't say there is a "better". Choose the one that has the features and design you like better. It is a preference thing.

  • @suny4128
    @suny4128 Před 2 lety +1

    Hi Tim - awesome course. I know there are ways to get Serilog to create multiple sinks and filter what goes into each - but can not find out if there is a way to get Seq to handle that and repoint to different input sinks. We need this for performance and separation of multi customer views. Do you know of anything?