persistence@glassfish.java.net

Re: How to use Java logger in Java SE?

From: Tom Ware <tom.ware_at_oracle.com>
Date: Tue, 05 Sep 2006 09:53:16 -0400

Hi Wonseok,

  You are correct, there is no current configuration option that lets
you automatically change the logger. That would be a good feature
request to enter in the issue tracker.

  I believe your best bet is to subclass NoServerPlatform and override
the getServerLog() method in the same way as it is implemented in
SunAS9ServerPlatform.

-Tom

Wonseok Kim wrote:

> Hi, all
>
> After I see the discussion thread about issue#988 - Logging
> integration with GF happens too late,
> I got a question about logger in Java SE mode.
> Java logger (JavaLog) can be used by configuring ServerPlatform (like
> GlassFish), but can it be used in Java SE also?
> I can't see any configuration for changing logger - only
> DefaultSessionLog is used.
>
> If it cannot be changed in current implementation, how about making
> the property like "toplink.logging.logger=<logger_classname>"?
> I think it can be also used in Java EE environment. Then it doesn't
> need to implement ServerPlatform class to change only logger in other
> Java EE container environment.
>
> Thanks
> --
> Wonseok Kim
> Senior Developer, TmaxSoft