RFR: 8332113: Update nsk.share.Log to be always verbose [v3]
Leonid Mesnik
lmesnik at openjdk.org
Fri Jun 14 00:54:21 UTC 2024
On Fri, 14 Jun 2024 00:31:41 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> The intention is to print always all logged messages. So we should set the highest tracing level for the logger to work in debug mode.
>
> I'm not so sure I agree with this. Do we have examples of debug logging? I think in general verbose logging has actually been used to produced a log of useful info, so always logging in verbose mode seems like a good idea, but I see debug logging as something beyond that, and may get too noisy.
That's quite an ineteresting thing. I haven't find any trace usage in tests and thought that it is never used. However, it is used actually by Binder and SocketConnection. And with completely different levels.
The log has class TraceLevel:
public static final int TRACE_NONE = 0;
public static final int TRACE_IMPORTANT = 1;
public static final int TRACE_NORMAL = 2;
public static final int TRACE_VERBOSE = 3;
public static final int TRACE_DEBUG = 4;
while Binder and SocketConnection use their own trace levels
private static int TRACE_LEVEL_PACKETS = 10;
private static int TRACE_LEVEL_THREADS = 20;
private static int TRACE_LEVEL_ACTIONS = 30;
private static int TRACE_LEVEL_SOCKETS = 40;
private static int TRACE_LEVEL_IO = 50;
So even with my fix I haven't seen any changes. I'll left traceLevel changes for separate PR, need to move them out of Log into Binder/Connections. They might be useful to debug packets/connection but not needed to be always enabled.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19613#discussion_r1639083715
More information about the serviceability-dev
mailing list