> > try to specify a system property as follows:
> >
> > org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.L
> > ogFac
> > toryImpl
>
> I think I need to re-state my question.  I have no need (at the moment)
> for huge amounts of control over the logging facility.  I just want to
> be able to use a simple Log interface for logging debugging info.  I
> don't care where it comes from, and in the case of WSAD, I just want to
> tie into the provided logging infrastructure.  I'm hoping JCL can do
> that for me.

i personally think it's not a good idea to use the WSAD log factory. If you
want a very simple logging facility, use the JCL LogFactoryImpl and
SimpleLog
(-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog)
.

If you really want to save the effort of specifing two system properties,
lookup the WSAD document on how to use the WSAD logging. Afaik, the logging
is configured at:
        Your Server Configuration > Trace tab >
                check Enable Trace
                specify *=all=enable    (for enable all trace, or study the docs on 
how to
log by package/log level)
        The default ${SERVER_LOG_ROOT}/trace.log is located deeply under
.metadata/.plugins/xxx/ of your project folder.

>From the fact that the 2nd paragraph above seems to be more complex, it's a
better idea to use SimpleLog instead.


>
> > In WSAD, there is an IBM log factory implementation:
> > com.ibm.ws.commons.logging.TrLogFactory by default. You may override
> > it by
> > any ways such as using the above system properties or using
> > PARENT_LAST in
> > class loader policy.
>
> How do I get a logging instance from that factory using JCL?
>

There is nth special. Just get a logger from the default LogFactory as same
as using any common logger, for example:
        Log log = LogFactory.getLog(MyClass.class);
                log.info("this message is logged");
        see API doc:

http://jakarta.apache.org/commons/logging/api/org/apache/commons/logging/Log
Factory.html


regards,
mingfai



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to