Derby.stream.error.file
properties are ignored. Default derby.log. Example derby.stream.error.file=error.txt Dynamic or static This property is static; if you change it while Derby is running, the change does not take effect until you reboot. Parent topic: Derby properties Related reference derby.authentication.ldap.searchAuthDN derby.authentication.ldap.searchAuthPW derby.authentication.ldap.searchBase derby.authentication.ldap.searchFilter derby.authentication.provider derby.authentication.server derby.connection.requireAuthentication derby.database.defaultConnectionMode derby.database.forceDatabaseLock derby.database.fullAccessUsers derby.database.propertiesOnly derby.database.readOnlyAccessUsers derby.database.sqlAuthorization derby.infolog.append derby.language.logQueryPlan derby.language.logStatementText derby.locks.deadlockTimeout derby.locks.deadlockTrace derby.locks.escalationThreshold derby.locks.monitor derby.locks.waitTimeout derby.storage.initialPages derby.storage.minimumRecordSize derby.storage.pageCacheSize derby.storage.pageReservedSpace derby.storage.pageSize derby.storage.tempDirectory derby.stream.error.field derby.stream.error.method derby.stream.error.logSeverityLevel derby.system.durability derby.system.home derby.user.UserName
must be public and static. Its return type can be either java.io.OutputStream or java.io.Writer. Derby will not call the close() method of the object returned by the method. The method is called once at Derby boot time, and https://db.apache.org/derby/docs/10.2/tuning/rtunproper18151.html the return value is used for the lifetime of Derby. If the method returns null, the error stream defaults to the system error stream. If the method does not exist or is inaccessible, the error stream defaults to http://docs.oracle.com/javadb/10.6.2.1/ref/rrefproper35028.html the system error stream (java.lang.System.err). If the value of this property is set, the property derby.stream.error.field is ignored. Default Not set. Example derby.stream.error.method=java.sql.DriverManager.getLogStream Scope system-wide Dynamic or static This property is static; if you change it while Derby is running, the change does not take effect until you reboot. Parent topic: Derby properties Related reference derby.authentication.builtin.algorithm derby.authentication.ldap.searchAuthDN derby.authentication.ldap.searchAuthPW derby.authentication.ldap.searchBase derby.authentication.ldap.searchFilter derby.authentication.provider derby.authentication.server derby.connection.requireAuthentication derby.database.defaultConnectionMode derby.database.forceDatabaseLock derby.database.fullAccessUsers derby.database.noAutoBoot derby.database.propertiesOnly derby.database.readOnlyAccessUsers derby.database.sqlAuthorization derby.infolog.append derby.jdbc.xaTransactionTimeout derby.language.logQueryPlan derby.language.logStatementText derby.locks.deadlockTimeout derby.locks.deadlockTrace derby.locks.escalationThreshold derby.locks.monitor derby.locks.waitTimeout derby.replication.logBufferSize derby.replication.maxLogShippingInterval derby.replication.minLogShippingInterval derby.replication.verbose derby.storage.initialPages derby.storage.minimumRecordSize derby.storage.pageCacheSize derby.storage.pageReservedSpace derby.storage.pageSize derby.storage.rowLocking derby.storage.tempDirectory derby.stream.error.field derby.stream.error.file derby.stream.error.logSeverityLevel derby.system.bootAll derby.system.durability derby.system.home derby.user.UserName Scripting on this page tracks web page traffic, but does not change the content in any way.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more http://stackoverflow.com/questions/1004327/getting-rid-of-derby-log about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Getting rid of derby.log up vote 20 down vote favorite 15 I'm using the Apache Derby embedded database for unit testing in a Maven project. Unfortunately whenever I run the test I end up with the derby.log file in the root of the project. The database itself is created in the target directory (jdbc:derby:target/unittest-db;create=true) so that is not a problem. After consulting the reference guide I tried setting the logDevice parameter on the JDBC url (jdbc:derby:target/unittest-db;create=true;logDevice=/mylogs) but that seems to be for a different log, hence derby.log still appears. Any help is much appreciated. java maven-2 derby share|improve this question asked Jun 16 '09 at 22:54 Allan Lykke Christensen 96521021 add a comment| 8 Answers 8 active oldest votes up vote 18 down vote accepted You can get rid of derby.log file by creating the following class public class DerbyUtil { public static final OutputStream DEV_NULL = new OutputStream() { public void write(int b) {} }; } and setting the JVM system property derby.stream.error.field, for example, using the following JVM command-line argument: -Dderby.stream.error.field=DerbyUtil.DEV_NULL Credit to whom it is due. share|improve this answer edited Apr 26 '12 at 21:37 CCCV 13829 answered Jun 17 '09 at 1:34 stevedbrown 5,63573250 What if I'm using Derby through Hibernate? Where to I put the line "derby.stream.error.field"? –pek Sep 9 '09 at 16:30 In a webapp it's a pain to set system props. Any way around it? –bmargulies Nov 13 '09 at 14:29 I don't think so, but you can set things up in your web.xml or spring config to run at startup and do it there. –stevedbrown Nov 13 '09 at 17:15 Place the above in derby.properties eg. in the root of your project and remeber to use fully qualified name for the class. –homaxto Oct 31 '11 at 11:01 @bmargulies: System.setProperty( "derby.stream.error.field", "DerbyUtil.DEV_NULL" ); –JoshuaD Apr 4 '15 at 23:25 add a comment| up vote 36 down vote Derby lets you specify the name of the fil