Re: using OzoneLogger
Jimmy Stiefel <[email protected]> Tue, 18 Jan 2005 11:45:40 -0800
| Newsgroups | gmane.comp.java.ozone.user |
|---|---|
| Message-ID | <1106077540.7580.6.camel@crystal> |
I think a more typical way is declare
private static org.apache.log4j.Category logger =
Category.getInstance(YourImpl.class.getName());
then use logger as you do below:
logger.info("Your message here.");
Be sure to edit logging.properties to turn on logging in your impl
packages. If your Impl is in package "your.package" that line might
lokk something like this:
log4j.logger.your.package=DEBUG, stdout, file
hope that helps,
Jimmy
On Mon, 2005-01-10 at 10:39 -0200, Marcelo Rezende Módolo wrote:
> Hi,
>
> I need to log information when testing ozone apps, I did the folowing
> in my testing:
>
> public class KeywordImpl extends OzoneObject implements Keyword {
>
> static final long serialVersionUID = 1L;
>
> /**
> * log4j logger
> */
> private static final String parentLogger =
> OzoneLogger.getLogger(OzoneLoggerFactory.class).getName();
> private static final Logger logger =
> OzoneLogger.getLogger(parentLogger + KeywordImpl.class.getName());
>
> public void onCreate() {
> super.onCreate();
> logger.info("KeywordImpl#onCreate()");
> }
>
> }
>
> Is this the right way for using OzoneLogger?
>
> thanks a lot
> marcelo módolo
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt