users@jersey.java.net

[Jersey] Re: Enable Logging

From: Robert DiFalco <robert.difalco_at_gmail.com>
Date: Fri, 2 Aug 2013 12:57:36 -0700

Richard,

FWIW, I have this in my pom.xml:

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
        </dependency>


Along with log4j.logger.com.sun.jersey=FINEST in my log4j.properties but
I'm not able to get it working. Such a drag when things aren't simple.




On Thu, Aug 1, 2013 at 9:03 PM, Richard Sand <rsand_at_idfconnect.com> wrote:

> Hi Robert- Jersey 1.x uses java.util.logging, the logging system bundled
> into the java runtime. If you don't like JUL (who does?) I was able to
> successfully use slf4j (http://www.slf4j.org/ <
> http://www.slf4j.org/legacy.**html <http://www.slf4j.org/legacy.html>>)
> and its legacy package for JUL (http://www.slf4j.org/legacy.**html<http://www.slf4j.org/legacy.html>) to capture the Jersey 1.x logs into another framework. Hope this helps.
>
> -Richard
>
>> Robert DiFalco <mailto:robert.difalco_at_gmail.**com<robert.difalco_at_gmail.com>
>> >
>> Thursday, August 01, 2013 11:30 AM
>> I am mainly used to log4j.properties files so I'm not sure how to setup
>> logging for Jersey. I've tried system properties, log.properties files,
>> etc. But I'm clearly doing something wrong.
>>
>> What is the best way to enable FINEST logging for Jersey in a Spring
>> environment. Thanks! Oh, this is PRE-2.0.
>>
>
>