You would log more like this:
Log.debug("com.foo.myproject.mycategory", "2 + 2 = 5, for large values
of two", exception);
On Tue, Jan 10, 2012 at 10:11 AM, Will Lee <[email protected]> wrote:
> Thanks for quick reply, but I'm not quite sure about the usage of the
> category.
>
> What I am trying to achieve is, for example,
> if ClassA has logging statements
> Log.debug("construct A")
> Log.debug("hello A")
>
> and classB has
> Log.debug("construct B")
> Log.debug("hello B")
>
> I get logging output like this:
> construct A
> construct B
> hello A
> hello B
>
> now, I want to see only logging outputs of classA like this:
> construct A
> hello A
>
> If I were using Log4j, I would set log4j.properties
> log4j.logger.ClassA=debug
> log4j.logger.ClassB=error
>
> How can I achieve the similar results with gwt-log?
>
>
> On Jan 9, 9:41 pm, Fred Sauer <[email protected]> wrote:
> > http://code.google.com/p/gwt-log/wiki/GettingStarted#Use_logging_cate...
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Jan 9, 2012 at 3:21 PM, Will Lee <[email protected]> wrote:
> > > Hello,
> > > I just started learning GWT and gwt-log, and have some questions.
> > > I used Log4j before, and it's great that gwt-log has similar feel to
> > > it.
> >
> > > I was wondering how to configure which class to show logging
> > > selectively.
> > > Say that I put logging statements to both class A and B.
> > > Is there a way to make the logging visible for only class A?
> > > Is this something that I can configure in gwt.xml?
> > > or do I need to add .properties file (similar to log4j.properties)?
> >
> > > Thanks for your time!
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "gwt-log" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected].
> > > For more options, visit this group at
> > >http://groups.google.com/group/gwt-log?hl=en.
> >
> > --
> > Fred Sauer
> > [email protected]
>
> --
> You received this message because you are subscribed to the Google Groups
> "gwt-log" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/gwt-log?hl=en.
>
>
--
Fred Sauer
[email protected]
--
You received this message because you are subscribed to the Google Groups
"gwt-log" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/gwt-log?hl=en.