db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suat Gonul <suatgo...@gmail.com>
Subject Re: Changing logging mechanism for derby.log
Date Thu, 12 Jul 2012 13:26:22 GMT
On 07/12/2012 03:54 PM, Rick Hillegas wrote:
> On 7/12/12 5:22 AM, Suat Gonul wrote:
>> Hi everybody,
>>
>> In an OSGi based environment we are using the Derby database. So, I
>> would like to adjust location and the names of the derby.log file.
>> However, adjusting the global system properties e.g "derby.system.home",
>> "derby.stream.error.file" is not an option for us as there might be
>> other bundles using the Derby.
>>
>> In our system, we use Sling Logging Tools [1]. Is there any way to
>> integrate those tools with the logging mechanism of Derby. Or is there
>> any other way to configure the location and name of the "derby.log"
>> file? Thanks in advance...
>>
>> Best,
>> Suat
>>
>> [1] http://sling.apache.org/site/logging.html
>>
> Hi Suat,
>
> If you can wrap your custom logger in a class which implements
> java.io.OutputStream or java.io.Writer, then you can configure Derby
> to use that class. Please see the Reference Manual section on setting
> the derby.stream.error.method system property:
> http://db.apache.org/derby/docs/10.9/ref/
>
> Hope this helps,
> -Rick
>
Thanks for the fast reply. Then the only way to configure logging is to
adjust some system properties. Is there a way so that one OSGi component
uses "method1" while the other uses "method2" for logging. I am asking
this, because those components use completely different schemas.

Best,
Suat

Mime
View raw message