- changed milestone to 0.3.1 - Price-feed streaming service implementation
Control verbosity level via configuration option
I propose we rename the verbose parameter : verbosity.
Instead of boolean it should be String and accept the following values :
high : ( log.level >= debug )
normal : ( log.level >= info )
low : ( log.level >= warning )
We can then make more sophisticated changes and hide the complexity between these three pre-defined levels
Comments (22)
-
reporter -
reporter -
assigned issue to
-
assigned issue to
-
reporter The change will affect the files stored on filesystem too : We will keep the two files as before but they will contain the following :
verbosity = high . Standard file level : debug , Verbose file level : debug (the two files are identical)
verbosity = normal . Standard file level : info , Verbose file level : debug
verbosity = low . Standard file level : warn , Verbose file level : debug
-
basically we apply the same filter for only the standard logfile filter? what about HTML?
wondering if the distinction into these separate files still make sense..
-
another question while we're on the topic: the logfile loggers, don't use level? don't recall whether that was intentional or not.
-
reporter what about HTML?
In my prev comment I meant that the same applies for html and .log without distinction
the logfile loggers, don't use level? on't recall whether that was intentional or not.
It was intentional as the log file (standard) would be used in the GUI. We can add it back if you think it is necessary
-
reporter I am testing it now : Running the Bot with verbosity "low" : - stdOUT ok
-
the standard.log|html still contains log.info level messages . It shouldn't
-
Another issue : for tests, I imagine they should always use the other xml. However for some reason I now ran TestWrappers.java and the stdout was set to warn. It should be always set to debug for tests
-
-
reporter Running the Bot with verbosity "normal" : - stdOUT prints only warnings and error
-
reporter Running the Bot with verbosity "high" : - stdOUT prints only warnings and error
-
"However for some reason I now ran TestWrappers.java and the stdout was set to warn. It should be always set to debug for tests" => don't follow. Test uses test_logback.xml
-
the mentioned issues are solved (except TestWrappers). perhaps you can cross-check if you have time.
-
reporter On it now
-
reporter stdOUT is OK in all modes.
Files still have 6 issues marked below.
-
Verbosity : "normal" - verbose.log and .html file doesn't show debug messages [*1]
-
Verbosity : "high" - standard.log [2]and .html [3] doesn't show debug messages ;
-
Verbosity : "low" - standard.html shows infos (it should not, like in standard.log )[4] ; verbose.log [4] and .html [*6] only shows warnings and errors
Please refer to my previous message on the correct file content.
verbosity = high . Standard file level : debug , Verbose file level : debug (the two files are identical)
verbosity = normal . Standard file level : info , Verbose file level : debug
verbosity = low . Standard file level : warn , Verbose file level : debug
TestWrappers, on the contrary, seems to be fixed. However the other Tests (e.g TestPriceFeeds) still gives no correct output [*7].
-
-
ok fixed. there where additional level filters. in verbose this filter will still be used to stop Trace messages.
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>DEBUG</level> </filter>
-
Fixed and tested. Issue 7 happens because options is not defined and filtering does not happen. Suggestion is to remove the line
if (Global.options)
-
We haven't specified what UI will use in the cases. I suggest it will use verbose if it's high, otherwise the standard file, i.e.
if (Global.options.verbosity.equalsIgnoreCase(Settings.LEVEL_HIGH)){ f = verboselogfile; }
-
merged into develop. feel free to close.
-
reporter no.
Result issues from tests on develop
-
Verbosity : "low" - standard.html shows infos (it should not, like in standard.log )[1] ; verbose.log [2] only shows warnings and errors
-
Verbosity : "normal" - verbose.log only shows infos (not debug) [3]
-
Verbosity : "high" - standard.html[4] and .log[5] only shows infos (not debug)
TestWrappers follows level of verbosity of the config [6]
TestPriceFeed is blank [7]
We haven't specified what UI will use in the cases. I suggest it will use verbose if it's high, otherwise the standard file, i.e.
OK
Please before submitting for test again make sure issues 1 to 7 do not appear anymore
-
-
ok, my bad - the changes were only in test_logback not logback.xml. I adjusted logback.xml and am testing with mainlaunch also.
-
done. Note: before options is set logs of all levels go through. we start filtering once Global.verbosity is defined.
-
reporter - changed status to resolved
-
reporter - changed milestone to 0.3.1 - Price-feed streaming service implementation&integration
- Log in to comment