mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-02 14:38:28 +00:00
8196768: RootLoggerHandlers fails when source tree is read-only
Reviewed-by: dfuchs
This commit is contained in:
parent
0279b2d49a
commit
b3597efef7
@ -132,6 +132,7 @@ public class BadRootLoggerHandlers {
|
||||
}
|
||||
|
||||
Files.copy(initialProps, loggingProps, StandardCopyOption.REPLACE_EXISTING);
|
||||
loggingProps.toFile().setWritable(true);
|
||||
|
||||
SystemErr err = new SystemErr(System.err);
|
||||
System.setErr(new PrintStream(err));
|
||||
|
||||
@ -63,6 +63,7 @@ public class RootLoggerHandlers {
|
||||
Path loggingProps = USER_DIR.resolve(CONFIG_FILE);
|
||||
System.setProperty("java.util.logging.config.file", loggingProps.toString());
|
||||
Files.copy(initialProps, loggingProps, StandardCopyOption.REPLACE_EXISTING);
|
||||
loggingProps.toFile().setWritable(true);
|
||||
System.out.println("Root level is: " + Logger.getLogger("").getLevel());
|
||||
if (Logger.getLogger("").getLevel() != Level.INFO) {
|
||||
throw new RuntimeException("Expected root level INFO, got: "
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user