You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by David Orriss Jr <da...@davenet.net> on 2003/02/01 03:28:55 UTC

[Logging] Commons against Lumberjack...

Hi,

I'm having a weird problem with a Struts 1.1 based application being developed
at my company.  Before I get too far into any details surrounding it, I have one
simple question:

Has anyone in the commons logging dev group tested the Lumberjack JSR 47
implementation against the Logging api and verified that the two work together
in JDK 1.3?

--
David Orriss Jr.




Re: [Logging] Commons against Lumberjack...

Posted by David Orriss Jr <da...@davenet.net>.
On Mon, Feb 03, 2003 at 11:12:28AM -0800, Craig R. McClanahan wrote:
> 
> That's not the intent -- what I'd like to have, though, is a proposed
> patch that you've shown accomplishes that goal.  The original bug report
> only talked about changing which class to check for in order to gauge JDK
> 1.4 presence or not.
> 

I do not have the knowledge at this time to understand the low-level issues
as to exactly *why* Lumberjack and Commons-logging aren't working together.
When I have the time to resarch the issue I will let you know and either
provide the details of what I can find or provide you with the code to resolve
the issue.

Regards...

-- 

 David Orriss Jr.


Re: [Logging] Commons against Lumberjack...

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 3 Feb 2003, David Orriss Jr wrote:

> Date: Mon, 3 Feb 2003 10:06:22 -0800
> From: David Orriss Jr <da...@davenet.net>
> Reply-To: Jakarta Commons Users List <co...@jakarta.apache.org>
> To: Jakarta Commons Users List <co...@jakarta.apache.org>
> Subject: Re: [Logging] Commons against Lumberjack...
>
> On Friday, January 31, 2003 8:18 PM,
> Craig R. McClanahan <cr...@apache.org> wrote:
>
> >
> > There was a problem with the way that commons-logging was identifying
> > whether this was a JDK 1.4 system or not, which would cause a problem
> > on a JDK 1.3 system with an alternate JSR 47 implementation
> > installed.  This has been corrected in nightly build 20030201 of
> > commons-logging.  Could you please try again with this build and
> > report the results?
> >
> >
>
> Craig,
>
> We downloaded the nightly build and while yes, things *do* work now, this isn't
> quite the fix we had in mind.  The modification you wrote was to change
> isJdk14Available() as follows:
>
>     /**
>      * Is <em>JDK 1.4 or later</em> logging available?
>      */
>     protected boolean isJdk14Available() {
>
>         try {
>             loadClass("java.sql.Savepoint");
>             loadClass("org.apache.commons.logging.impl.Jdk14Logger");
>             return (true);
>         } catch (Throwable t) {
>             return (false);
>         }
>     }
>
> The result of this is that if we using JSR 47-compliant logging in JDK 1.3, we
> no longer have  a failure in struts.  *However* we still wanted the struts
> logging to go against our JSR 47-compliant libraries.  The result of your fix is
> that Commons Logging completely usurps the Lumberjack JSR 47 libraries.
>
> I take it these means that Commons Logging and Lumberjack are not compatible and
> probably never will be...?
>

That's not the intent -- what I'd like to have, though, is a proposed
patch that you've shown accomplishes that goal.  The original bug report
only talked about changing which class to check for in order to gauge JDK
1.4 presence or not.

> --
> David Orriss Jr.
>

Craig

Re: [Logging] Commons against Lumberjack...

Posted by David Orriss Jr <da...@davenet.net>.
On Friday, January 31, 2003 8:18 PM,
Craig R. McClanahan <cr...@apache.org> wrote:

>
> There was a problem with the way that commons-logging was identifying
> whether this was a JDK 1.4 system or not, which would cause a problem
> on a JDK 1.3 system with an alternate JSR 47 implementation
> installed.  This has been corrected in nightly build 20030201 of
> commons-logging.  Could you please try again with this build and
> report the results?
>
>

Craig,

We downloaded the nightly build and while yes, things *do* work now, this isn't
quite the fix we had in mind.  The modification you wrote was to change
isJdk14Available() as follows:

    /**
     * Is <em>JDK 1.4 or later</em> logging available?
     */
    protected boolean isJdk14Available() {

        try {
            loadClass("java.sql.Savepoint");
            loadClass("org.apache.commons.logging.impl.Jdk14Logger");
            return (true);
        } catch (Throwable t) {
            return (false);
        }
    }

The result of this is that if we using JSR 47-compliant logging in JDK 1.3, we
no longer have  a failure in struts.  *However* we still wanted the struts
logging to go against our JSR 47-compliant libraries.  The result of your fix is
that Commons Logging completely usurps the Lumberjack JSR 47 libraries.

I take it these means that Commons Logging and Lumberjack are not compatible and
probably never will be...?

--
David Orriss Jr.




Re: [Logging] Commons against Lumberjack...

Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Fri, 31 Jan 2003, David Orriss Jr wrote:

> Date: Fri, 31 Jan 2003 18:28:55 -0800
> From: David Orriss Jr <da...@davenet.net>
> Reply-To: Jakarta Commons Users List <co...@jakarta.apache.org>
> To: commons-user@jakarta.apache.org
> Subject: [Logging] Commons against Lumberjack...
>
> Hi,
>
> I'm having a weird problem with a Struts 1.1 based application being developed
> at my company.  Before I get too far into any details surrounding it, I have one
> simple question:
>
> Has anyone in the commons logging dev group tested the Lumberjack JSR 47
> implementation against the Logging api and verified that the two work together
> in JDK 1.3?
>

There was a problem with the way that commons-logging was identifying
whether this was a JDK 1.4 system or not, which would cause a problem on a
JDK 1.3 system with an alternate JSR 47 implementation installed.  This
has been corrected in nightly build 20030201 of commons-logging.  Could
you please try again with this build and report the results?

  http://jakarta.apache.org/builds/jakarta-commons/nightly/commons-logging/

> --
> David Orriss Jr.

Craig McClanahan