persistence@glassfish.java.net

Re: How to use Java logger in Java SE?

From: Wonseok Kim <guruwons_at_gmail.com>
Date: Wed, 6 Sep 2006 20:19:56 +0900

I filed an issue for this.
https://glassfish.dev.java.net/issues/show_bug.cgi?id=1096

Also I wrote a blog with regard to the workaround Tom suggested (see issue
comment).
I couldn't extend NoServerPlatform because it's final class, so I extended
ServerPlatformBase.

Thanks
- Wonseok

On 9/5/06, Tom Ware <tom.ware_at_oracle.com> wrote:
>
> 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
>
>