So I have this in my Startup.cs
by default:
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
How do I see the console the loggerFactory
is adding? I can see the logging info in the Debug output window, but it's very muddled with the rest of automatic debug information and hard to find.
Is there a way to view the logger console or if not, a way to display the information that only I log in Output?
The . NET Core agent logs information to the logs folder within C:\ProgramData\Contrast\dotnet-core\ on Windows or /var/tmp/contrast/dotnet-core/ on Linux, by default. Notes: Depending on the setup of the Windows profile and folder view settings, the ProgramData folder may be hidden.
logs files could show up in a few places. Your web traffic will show up where defined in your IIS configuration (default is c:\windows\system32\logfiles\[application id]\ ). . net error codes show up in your event viewer (start > run > eventvwr) under applications.
ILogger offers provider-based functionality to write to the console, the debug window, the Windows Event Log, to Microsoft Azure Ap Services diagnostics and logs, as well as to the TraceSource and the EventSource.
To display less clutter generated by the Framework in the Debug Window you can select which aspects are logged.
In particular I turn off "Module Load Messages" as that is the bulk of the messages (in VS 2015). Also, "Thread Exit Messages" are another to consider turning off.
Tools -> Options -> Debugging -> Output Window:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With