-
Notifications
You must be signed in to change notification settings - Fork 64
Description
How do I log to my services.AddLogging file?
So I am trying to put logging into an app of mine. In my Program.cs file I created a service.AddLogging file with a name of app_debug.txt.
Being that I am new at using this package. I used the LoggingTests as my examples and created a new LoggingFactory and AddProvider with the file name app.txt. Created a new logger and then build methods to write to the log file (Start, End, Message and Exception).
When I run the app from a browser I get all the messages from my debug window in VS written to the app_debug.txt file. All the other messages are written to app.txt.
So I am wondering whether creating the factory and logger then disposing of the factory for every message call is going to cause problems if I have 300 people working on the app?
Questions?
- What would be the best way to only have one LoggingFactory and one ILogger logger per session?
- How coud I write loggs to the app_debug.tx file. I cannot figure this out.
One suggestion. This would be easier if there was some examples of how to use the package.
Thank you,
Michael