It will be useful to know in derby.log, the possible locations of derby.properties and derby.log. Following 2 additional properties will now always be put in derby.log (every time a database is booted. Similar to existing jvminfo that is printed in derby.log)
user.dir is the system property which gives the user working directory. If the user has not specified derby,system.home, then Derby will look for optional derby.properties file in user.dir . If user has provided derby.system.home, then the optional derby.properties will be looked in derby.system.home rather than user.dir
If user has not provided derby.system.home, then a sample of the 2 properties on derby.log looks as follows on my machine
If user has set derby.system.home to c:./temp, then a sample of the 2 properties on derby.log looks as follows on my machine
In addition to the above 2 properties, there can be following 3 optional properties in the log (following the 2 properties mentioned above)
The above 3 properties provide a way to alter where error messages get logged rather than tranditional derby.log file. In the absence of the above 3 optional properties, the location of derby.log follows the same logic as derby.properties. But if the user has set any or all of the 3 optional properties, then derby.log will not be in same location as derby.properties. In the Derby code, derby.stream.error.file takes precedence over the other 2 properties and derby.stream.error.method take precedence over the last property.
Hopefully this additional information in the log file will be handy when working with customer issues. I have attached the patch for the code changes to accomplish above logging enhancement.