Logj4 usage

84 views
Skip to first unread message

Daniel Longosz

unread,
Aug 12, 2011, 9:07:23 AM8/12/11
to RestFB
Hi,
I would like to use Log4j in my project instead of java.util.logging.
I followed instructions given at http://restfb.com/ that is: I
attached specified jars with maven and run install on
SLF4JBridgeHandler. Then I have:
org.apache.log4j.Logger.getLogger("com.restfb") which doesn't work. I
know that because after setting level to OFF it still present logs to
stdout.

Any help would be appreciated.

Mark Allen

unread,
Aug 12, 2011, 5:02:29 PM8/12/11
to RestFB
Hi Daniel -

Can you include your log4j config file? I'm not an expert with this
stuff, but maybe I can give you a hand.

Thanks
Mark

On Aug 12, 9:07 am, Daniel Longosz <elvi...@poczta.onet.pl> wrote:
> Hi,
> I would like to use Log4j in my project instead of java.util.logging.
> I followed instructions given athttp://restfb.com/that is: I

Mark Allen

unread,
Aug 14, 2011, 8:09:33 AM8/14/11
to RestFB
Just wanted to update everyone because Daniel and I spoke offline due
to problems with Google Groups...

I've put together a small example project that demonstrates how to
disable java.util.logging for RestFB and instead route all logging
output to Log4j. Hopefully this helps others who would like to see a
working Log4j bridge implementation, since the docs and examples on
the web aren't as helpful as they could be (restfb.com included, until
now).

You may download it here: http://restfb.com/examples/RestFB%20Log4j%20Example.zip

Thanks
Mark

On Aug 12, 5:02 pm, Mark Allen <m...@xmog.com> wrote:
> Hi Daniel -
>
> Can you include your log4j config file?  I'm not an expert with this
> stuff, but maybe I can give you a hand.
>
> Thanks
> Mark
>
> On Aug 12, 9:07 am, Daniel Longosz <elvi...@poczta.onet.pl> wrote:
>
>
>
>
>
>
>
> > Hi,
> > I would like to use Log4j in my project instead of java.util.logging.
> > I followed instructions given athttp://restfb.com/thatis: I

Daniel Longosz

unread,
Aug 16, 2011, 3:11:22 AM8/16/11
to res...@googlegroups.com
Thank you very much Mark. Code you posted here was exactly what I needed and it solved my problem.

Best regards,
Daniel
Reply all
Reply to author
Forward
0 new messages