db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bergquist, Brett" <BBergqu...@canoga.com>
Subject I implemented a rolling "derby.log" (DERBY-6350)
Date Thu, 19 Sep 2013 19:55:23 GMT

I implemented this as part of the Derby core engine.  I put my classes in:



As there really was not any other good place that I could find this package is also used for
the basic error stream handling.

Once this is incorporated and derby.jar  built, it can be used by simply adding:


To "derby.properties".  In this example, the rolling log files will appear in the DERBY_HOME
directory and have the names derby-0.log, derby-1.log, derby-2.log, derby-3.log, derby-4.log
(maximum count of 5 files) and will have a maximum size of 2048000 bytes each.

Note that this just provides the rolling error stream and the utility class configure and
return the stream.  It uses the "derby.stream.error.method" that exists already to hook into
the logging.

If someone could review this patch it would be much appreciated.   I know that unit tests
need to be created to support this feature but I have not written any up until now.  So if
someone could give me some guidance on doing so, again, it would be much appreciated.

It would be great to see this functionality become a standard part of Derby as I know there
are others out there that want this:


View raw message