RFR: 8332113: Update nsk.share.Log to be always verbose [v3]

Serguei Spitsyn sspitsyn at openjdk.org
Fri Jun 14 01:04:12 UTC 2024


On Fri, 14 Jun 2024 00:49:28 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> The nsk.share.Log  has 3 parameters that might be configured by tests or using command-line:
>>  - verbose, traceLevel and timestamp 
>> 
>> The main purpose of these modes was to minimize output and use command-line arguments to enable them during bug reproducing/debugging for vmTestbase when it was compiled separately.  
>> 
>> However, such an approach has several disadvantages:
>>  -- For intermittent issues, there is no all data in the logs 
>>  -- The enabling log might affect test behavior 
>>  -- No easy way to set these command-line options for jtreg tests
>>  -- When verbose mode is disabled the messages are saved in some buffer and printed only test complains. The mode causes issues if the test fails without complaining (exception, crash, etc). The messages are just never printed.
>>   -- the solution is over-complicated.
>> 
>> The fix enabled verbose mode and printing time stamps always, setting the debugging log level.
>> 
>> The plan is to remove all these options and simplify logging as much as possible in the future.
>
> Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
> 
>   reverted traceLevel

I agree with the approach to enabled logging by default and always wanted it.
Otherwise, it is not easy to deal with the intermittent failures.
Logging in some tests can be excessive though. We may need to follow up on this if some tests print too much details.
The fix looks good to me.

-------------

Marked as reviewed by sspitsyn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19613#pullrequestreview-2117241238


More information about the serviceability-dev mailing list