-
Notifications
You must be signed in to change notification settings - Fork 53
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
[LOG] Set default log level to 'debug' #1134
Conversation
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.
We probably should have done this way sooner.
I am all for it.
But maybe we should add a note about the default and how to change it to trace to
https://www.saros-project.org/contribute/logging.html ?
After reading the page, I am a bit confused which configuration is actually used. Because the logic that sets up the logging in Saros/E and Saros/I actually specifies the log level as well. It seems to use the stricter of the two log levels. So leaving the implementations as 'ALL' and just specifying the wanted minimal log level in the xml config should work. It still seems weird to me. @m273d15 Any comments on the behavior? Additionally, Saros/E has a separate log4j configuration XML and Saros/I does not. (The Saros/E configuration file is already set to 'debug' by default.) But this is something that students are currently working on if I remember correctly, isn't it? |
It was supposed to become easier after the work that lead to #1124 was done. The original proposal of @m273d15 imagined something like a log4j-Bundle. But I do not think that this PR is attempting to solve the log4j problem itself. |
Sets the default log level to 'debug'. For most development or even debugging tasks, the 'trace' log level should not be necessary. It provides very detailed information for many background processes that often aren't of interest. This floods the logs with way too many messages to properly discern the important information. If the 'trace' level is actually needed, it can still be set manually be the developer. Adjusts the Logging page to specify the correct base log level. Also adds a section on how to set the log level during development.
edb2dce
to
161f769
Compare
Adjusted the |
The TRACE log level was (is?) only used if you start the STF launch configuration. I do not know how IntelliJ setup things but it is really necessary to touch the configuration files when you can do most stuff via coding ? |
I was working under wrong assumptions when saying that Saros/E currently has a configuration file that is set up for
With the current setup on master, Saros/E runs with the log level As mentioned above, the log level can be set in two places: The central configuration file for log4j or the implementation-specific logic loading the logger. On the current master, all of these are set up with the log level I am not sure what you mean by "do most stuff in coding". Could you be more specific? In general, I would prefer setting the wanted default log level in the global configuration instead of for each component separately. And in the rare case where a developer wants to enable The only remaining outlier is the STF. If we wan't to run it at a |
What is the problem running the STF with trace mode ? You can spot the start and ending in the log files. Again what is wrong with trace mode when running the application in test mode ? As for the log files, it really does not matter if you use debug or trace as most people does not even have a clue what is going on when reading the log. Seriously, just grab an editor an just filter the trace statements out (should not be that hard). Default level should be INFO, WARNING, ERROR, FATAL. If you need to write code in the application to change it, then yes please apply a patch and ensure that other levels are enabled only if you are running Saros in development environment. |
I don't have an issue with running the STF in To get more concrete, I have an issue with using the That is why I was saying that, in my opinion,
That is already the case. Maybe my previous statement was not as clear as I thought. In general, the default log level for Saros/E is Currently, this broader log level is |
I got your problem which simply relies on the fact that the network layer "spams" the logfile for every packet, My simple proposal (at least for Saros/E), in production mode FATAL, ERROR, WARN, INFO, normal startup +DEBUG and running the STF +trace. So just ensure that the default level does not include DEBUG or everything more detailed. The rest should be done via coding. If this is already the case for this patch then you are free to merge it. |
I am still not sure what you mean by |
https://github.com/saros-project/saros/blob/master/eclipse/src/saros/Saros.java#L265 How is it done in IntelliJ ? |
Ok, so we are talking about the same thing. In IntelliJ, the logic is basically the same (with the exception that the base log level in production is It just seems weird to me to have a setup in the log4j2 configuration file that is basically ignored as the real rules are set up separately by each Saros implementation. This makes it much harder to actually understand the used log level. This is made more complicated by the fact that the configurations don't seem to actually overload each other but rather the more strict log level of the two configurations seems to be used (i.e. it does not matter whether I set the file to |
Well we could make many guesses or @m273d15 could simply explain his intentions. But if you say that the more restrictive level is taken anyways then there is really no choice beside setting the default log level to trace in the configuration file. Or it is an issue in our coding. I do not know it. |
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.
Everything properly formatted etc.
Nothing changing the actual code so fully compatible.
I can't really review if this makes sense but the intention mentioned sounds logical and would increase efficiency
Sets the default log level to 'debug'. For most development or even
debugging tasks, the 'trace' log level should not be necessary. It
provides very detailed information for many background processes that
often aren't of interest. This floods the logs with way too many
messages to properly discern the important information.
If the 'trace' level is actually needed, it can still be set manually be
the developer.