You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Benson Margulies (JIRA)" <ji...@apache.org> on 2010/10/07 13:59:31 UTC

[jira] Created: (DERBY-4839) Could we please have a much simpler way to control the location of the derby.log file?

Could we please have a much simpler way to control the location of the derby.log file?
--------------------------------------------------------------------------------------

                 Key: DERBY-4839
                 URL: https://issues.apache.org/jira/browse/DERBY-4839
             Project: Derby
          Issue Type: Improvement
          Components: Miscellaneous
    Affects Versions: 10.6.1.0
            Reporter: Benson Margulies


I've spent a great deal of time trying to come up with a reliable way to tell Derby where to put derby.log when using the embedded environment. My success rate is very low. 

The best I came up with was the following class used with Spring.

Could I possibly persuade you that there should be a URL parameter, or just a function to call?

public class DerbyConfigUtilBean {
    @PostConstruct
    public  void relocateDerbyLog() {
        File tempDirFile = new File("target");
        String tempPath = tempDirFile.getAbsolutePath();
        System.setProperty("derby.system.home", tempPath);
        System.setProperty("derby.stream.error.file", tempPath + "/derby.log");
    }

}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.