db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-4839) Could we please have a much simpler way to control the location of the derby.log file?
Date Thu, 07 Oct 2010 11:59:31 GMT
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.


Mime
View raw message