-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging issue on .netcore applications #170
Comments
Hi and thanks! :) - can you do a PR on this issue? |
Yes, I'll sort it out this weekend :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Logs don't work under .netcore regarding of the configuration used.
Detailed Explanation
Doesn't matter how much I change the configuration for the logger based on the Microsoft documentation, be it through the
appsettings.json
or throughenvironment variables
, I can never get the logger to output the issued commands to theSystem.Diagnostics.Trace.Listeners
.After digging through the source code, I've found that for .netcore applications the code logs using the
Trace
log level as shown on the following line.FluentDocker/Ductus.FluentDocker/Common/Logger.cs
Line 22 in 97733b6
But then the provided provider is injected with the use of the
.AddDebug()
extension method which by default uses a minimum log level ofInformation
.FluentDocker/Ductus.FluentDocker/Common/Logger.cs
Line 33 in 97733b6
Due to this, for .netcore all the logs are dropped due to the filter, I've compiled it myself and changed the LogLevel to
Trace
and was then able to get the logs on the Listeners as expected.Possible Solution
Change the LogLevel filter on the Logger component.
Why this is a problem (for me)
Currently, one of my build machines is printing the
docker-compose up
help documentation as an error instead of creating the stack. I want to be able to see what is the command that is being issued in order to see what is the problem.Any input would be appreciated.
Thanks in advance 😄
The text was updated successfully, but these errors were encountered: