#87 Explicitly (rather than implicitly) read logging config

open
nobody
Harness (16)
5
2012-01-03
2012-01-03
No

(This issue was original raised on the dacapobench-researchers mailing list: https://sourceforge.net/mailarchive/message.php?msg_id=28586976.\)

Currently, Benchmark.initialize() tries to ensure that an empty logging configuration is used by pointing "java.util.logging.config.file" to a non-existing file:

System.setProperty("java.util.logging.config.file", fileIn(scratch, config.name + ".log"));

However, this may not succeed if the LogManager has already been loaded prior to the call to Benchmark.initialize(), (This may happen, e.g., if a Java agent running together with the benchmarks uses java.util.logging.)

I think the cleanest solution would be to explicitly set the file through a call to LogManager.readConfiguration (rather than just implicitly through setting "java.util.logging.config.file"), if the intention of the above snippet is indeed to provide a clean slate.

That being said, the .log extension for the configuration file is IMHO very misleading (.properties would be more apt), as it is not a log file itself (stdout.log and stderr.log are, but not $BENCHMARK.log).

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks