Bug #7635
RemoteObject defaults to 'tracing' mode
100%
History
#1 Updated by Constantin Asofiei 10 months ago
In RemoteObject
, the LOG
instance gets created and RemoteObject$RemoteAccess.tracing
flag gets set before the logging is configured - and as by default isLoggable
returns true, then the 'tracing' flag gets set to true, via this stacktrace:
CentralLoggerNoModeWrapper(CentralLogger).isLoggable(Level) line: 1057 RemoteObject$RemoteAccess.<init>(Session, int) line: 1429 RemoteObject.obtainNetworkInstance(Class<?>[], Session, int) line: 1045 RemoteObject.obtainNetworkInstance(Class<?>, Session) line: 914 DirectoryManager.initRemote(Session) line: 95 ClientCore.initialize(InitStruct, boolean, BootstrapConfig, Supplier<String>, String) line: 306 ClientCore.start(BootstrapConfig, boolean, Supplier<String>) line: 479 ClientDriver.start(BootstrapConfig) line: 270 ClientDriver(CommonDriver).process(String[]) line: 539 ClientDriver.process(String[]) line: 347 ClientDriver.main(String[]) line: 390
We need a way to refresh this flag once the logging has initialized.
#4 Updated by Greg Shah 10 months ago
Code Review 7635a Revision 14669
The change is fine. The cost is 3 extra method calls (isLoggable() and inside there are two calls to Level.intValue() which is just returning a final int value). This should not matter (especially if it gets inlined in the JIT results).
In the future, please add your history entry before the code review.
#7 Updated by Constantin Asofiei 9 months ago
The same fix needs to be done at Dispatcher.tracing
.
#8 Updated by Galya B 9 months ago
Constantin, I see you often merge branches. Can you make those small updates to logs, you're most well familiar with, in your own branches? I was expecting tweaking to be required after the initial merge, but it involves the whole system and everyone can take over it.