- support of "%h" and "%t" pattern components
- more proper initialization of file handler when the data folder is not
the default one, notably to prevent a non blocking but ugly error stack
trace reported by the log manager at startup with that kind of setup
System.err.println("Error creating DATA-directory in "+dataHome.toString()+" . Please check your write-permission for this folder. YaCy will now terminate.");
System.exit(-1);
}
// set jvm tmpdir to a subdir for easy cleanup (as extensive use file.deleteonexit waists memory during long runs, as todelete files names are collected and never cleaned up during runtime)
// keep this as earlier as possible, as any other class can use the "java.io.tmpdir" property, even the log manager, when the log file pattern uses "%t" as an alias for the tmp directory
try{
tmpdir=java.nio.file.Files.createTempDirectory("yacy-tmp-").toString();// creates sub dir in jvm's temp (see System.property "java.io.tempdir")
System.setProperty("java.io.tmpdir",tmpdir);
}catch(IOExceptionex){}
// setting up logging
f=newFile(dataHome,"DATA/LOG/");
@ -178,7 +185,7 @@ public final class yacy {
System.out.println("could not copy yacy.logging");
System.out.println("could not find logging properties in homePath="+dataHome);
ConcurrentLog.logException(e);
@ -203,12 +210,6 @@ public final class yacy {
lock=channel.tryLock();// lock yacy.running
}catch(finalExceptione){}
// set jvm tmpdir to a subdir for easy cleanup (as extensive use file.deleteonexit waists memory during long runs, as todelete files names are collected and never cleaned up during runtime)
try{
tmpdir=java.nio.file.Files.createTempDirectory("yacy-tmp-").toString();// creates sub dir in jvm's temp (see System.property "java.io.tempdir")