db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Derby housekeep function for derby.log
Date Wed, 10 Jul 2013 12:30:29 GMT
On 7/10/13 4:03 AM, Knut Anders Hatlen wrote:
> Anon User<pingweitan@gmail.com>  writes:
>> Greetings,
>> With derby.infolog.append=true set, derby.log will not be delete and
>> re-create upon stop and start Derby.
>> Furthermore, once the application is stable, most likely derby would not be
>> reset for a very long time.
>> Question: Does Derby provides some kind of housekeep function on derby.log?
>> Reason being was the worries on derby.log grows too big that will affect
>> system performance or hang the system, worst case.
> Hi,
> Derby doesn't currently offer that kind of functionality, I think.
> There has been some talk about replacing Derby's custom logger with
> java.util.logging:
> https://issues.apache.org/jira/browse/DERBY-3481
> https://issues.apache.org/jira/browse/DERBY-5007
> But it hasn't been implemented yet. The logger in java.util.logging
> includes functionality for log file rotation, which would help in the
> scenario you mentioned.
As a workaround, you can write or find an off-the-shelf implementation 
of java.io.OutputStream or java.io.Writer, one which rotates log files. 
Then you can point derby.stream.error.method at a public static method 
which materializes the custom logger. For more information, see the 
Reference Guide section on derby.stream.error.method: 

Hope this helps,

View raw message