ucdavis / tacos

Teaching Assistant Calculated Outcome System
MIT License
0 stars 0 forks source link

logging fixes to .net core 3 way #115

Closed srkirkland closed 4 years ago

srkirkland commented 4 years ago

So Serilog integration is a little different in .net core 3.1, and Stackify is very different. netcore now has its own logger, but in this PR in the Program.cs file I overwrite that with the UseSerilog() on line 55 (before we had sorta a hybrid 2 loggers approach). The Log config is moved right to the top of Program.cs instead of happening in the now deleted LogHelper.cs class. This also has the benefit of making the startup simple-- we just need Configuration.ConfigureStackifyLogging(); to hook things together so the correct app settings get read and used.

One last thing, in Startup.cs on line 86 I added app.UseSerilogRequestLogging(); which basically hooks into .net and does request tracing, similar to what we had before but hopefully less wordy.