[ 
https://issues.apache.org/jira/browse/DERBY-6350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13774794#comment-13774794
 ] 

Brett Bergquist commented on DERBY-6350:
----------------------------------------

I have implemented this as follows and will attach a patch shortly.

I added a new property:

derby.stream.error.style=rollingFile

I chose this so that in the future if there is an "logger" implementation, then 
one could also support:

derby.stream.error.style=logger

When this is set to "rollingFile", then internally, this passes in 
"org.apache.derby.impl.services.stream.RollingFileStreamProvider.getOutputStream"
 to the code that  processes "derby.stream.error.method".   

So now 
"org.apache.derby.impl.services.stream.RollingFileStreamProvider.getOutputStream"
 is not exposed to the user.  

I also modified to not catch any IOException or SecurityException in 
"org.apache.derby.impl.services.stream.RollingFileStreamProvider".  If this 
occurs normal "derby.log" will be used and the error will be logged to 
"derby.log".  This is similar as to what happens if you use 
"derby.stream.error.file" and point it at a file that cannot be accessed (ie. 
the directory does not exist for example).   


                
> Provide a rolling file implementation of derby.log
> --------------------------------------------------
>
>                 Key: DERBY-6350
>                 URL: https://issues.apache.org/jira/browse/DERBY-6350
>             Project: Derby
>          Issue Type: Improvement
>          Components: Miscellaneous
>            Reporter: Brett Bergquist
>            Priority: Minor
>              Labels: features
>         Attachments: rollingfilelog.patch.txt
>
>
> By default, derby.log grows without bounds if the derby.infolog.append 
> property is set to "true".   Setting this to "true" helps in a hands off 
> production environment to ensure that if Derby restarts, the derby.log which 
> might contain important information is not lost.  On the other hand, when set 
> the "true" the derby.log grows without bounds.  This is problematic in a long 
> running system.  
> What is really needed is the ability to have a rolling derby.log file support 
> where the maximum file size and maximum number of files can be specified.  
> Derby has the ability to configure the location of the log file (ie. 
> derby.stream.error.file) and also two methods of redirecting the error stream 
> (.ie derby.stream.error.method and derby.stream.error.field).  There is no 
> standard implementation that supports a rolling derby.log however.
> This facility should be part of the core Derby system so that it works in 
> both embedded and network server models.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to