Repository navigation
move derby.log to logs folder instead of install root - #488
tonygermano wants to merge 1 commit into
Conversation
|
Can this be actively set from code? This is presumably CWD dependent - we should be reducing our CWD dependency, not increasing. |
@mgaffigan I'm not sure. Can come back to this later, but I just wanted to get it documented so I didn't forget about it, and a 1-liner was just as easy as opening an issue. I'm guessing anything else will take more effort. |
By default, this file is created in the JVM working directory. Signed-off-by: Tony Germano <tony@germano.name>
62c9258 to
196a724
Compare
|
@mgaffigan After checking again, I think this is the appropriate place to set it. This is the property the library looks for. This location is easy to override or set as an absolute path in Recently rebased to resolve a merge conflict with #447 |
mgaffigan
left a comment
There was a problem hiding this comment.
I would still prefer a CWD insensitive setting (e.g.: set the property from code).
|
@mgaffigan I'm not sure if I understand what you mean by CWD insensitive. The system property can be set to an absolute or relative pathname. I just have it defaulted to the same location that the log4j default uses. What would it look like to set the property from code? And is it worth adding code to handle this if we end up removing derby in the near future? |
|
CWD insensitive refers to the property of each unit of software having the same behavior regardless of the system current working directory. Since this would presumably produce different results based on which directory, it would be cwd sensitive. CWD insensitive behavior would be to make the property relative to the config file or to the application directory, or to throw on other than an absolute path. I would presume setting it from code would be: var logPath = StringUtils.defaultIfEmpty(System.getProperty("derby.stream.error.file"), "logs/derby.log");
System.setProperty("derby.stream.error.file", appRoot.resolve(Path.of(logPath)).toString()); |
By default, this file is created in the JVM working directory.
Release Note
Update
conf/base_includes.vmoptionsto set the derby log path tologs/When using Derby, the
derby.logfile is created in the oie install folder by default. Thebase_includes.vmoptionsfile now sets thederby.stream.error.filesystem property to use the samelogs/folder used by default by log4j. The value can be overridden incustom.vmoptionsto choose a different path. The destination directory must already exist.