-
Notifications
You must be signed in to change notification settings - Fork 412
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
Remove HTTP log spam on default settings #6097
Conversation
I would like to understand why it was needed. Why can't we rely on NLog.config? https://github.com/NethermindEth/nethermind/blob/master/src/Nethermind/Nethermind.Runner/NLog.config#L110 |
I'm not an expert on NLog, but the reason why we can't just use the This change ensures that the manual override does not modify these |
Similar to what was discussed on #6051 (comment), a better solution would be to not do this manual override, but instead rely on variables that we set up during initialization. On <variable name="LogLevel" value="Info" />
<!-- ... -->
<logger name="*" minlevel="Off" writeTo="seq" />
<logger name="*" minlevel="${LogLevel}" writeTo="file-async" />
<logger name="*" minlevel="${LogLevel}" writeTo="auto-colored-console-async" /> And then, during initialization: NLog.LogManager.Configuration.Variables["LogLevel"] = logLevel; // parse and get the log level from CLI/Env/whatever.
NLog.LogManager.Configuration = NLog.LogManager.Configuration.Reload(); The reason why I didn't push forward with this type of change is that we would need to redo the whole NLog initialization code to use only variables for it to make sense. Would it make sense to push forward with this refactor @MarekM25? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so please add comments and we could move forward with this PR
@MarekM25 @emlautarom1 |
Fixes #6017
Changes
JsonWebAPI*
rules.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Tested on VM using with and without the
--log info
flag.Documentation
Requires documentation update
Requires explanation in Release Notes
Remarks
Passing
--log info
as a argument results in the same logging settings as not passing any argument.