On Thu, 24 Feb 2005 02:40:58 -0800, Jmeter Dev
<[EMAIL PROTECTED]> wrote:
> > You said that you wanted to add log4j support to JMeter.
> >
> > If want the code to be considered for inclusion in a future release of
> > JMeter, it should be done via Commons Logging. Otherwise it's up to
> > you.
> >
> > Commons Logging is already present, so you can write code that uses
> > Commons Logging.
> >
> > Or you can use the existing JMeter logging package.
> >
> > What is it about the the existing logging support that does not meet your
> > needs?
> I'm a little confused, you wrote: 'Commons Logging is already present',

I meant that the Commons Logging *jar* is already present.
It is used by some of the other jars, e.g. HttpClient (I think).

> but you also wrote: 'Migrating to Commons Logging is on my TODO (one
> day) list ...' isn't it a contradiction? if it is already present, how

It's not a contradiction.
Most of JMeter uses LoggingManager, which does not use Commons Logging.

One day I'd like to create a new LoggingManager that uses
CommonsLogging, and then work through all the modules to change to the
new manager (I don't think it's possible to use Commons Logging
without changing the import statements in every module).

> can I use it? through the existing JMeter logging package?

Yes - but you need to call it directly, not through LoggingManager.

> Regarding the existing JMeter logging package, are you talking about the
> LoggingManager? where can it be configure (okay, the logs are written to
> jmeter.log, but what level of logs? debug? warn? error? any others
> configuration?)

See jmeter.properties. 

And the documentation, in particular:
http://jakarta.apache.org/jmeter/usermanual/get-started.html

> You said that I can add Log4J by myself, any idea why After importing
> org.apache.log4j.Logger and writing something like:
> protected static Logger myLog =
> Logger.getLogger(MyClass.class.getName());
> I'm getting this exception during runtime (it compiles, of course):
> java.lang.NoClassDefFoundError: org/apache/log4j/Logger
>         at expansion.extractor.MyClass.<clinit>(MyClass.java:25)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Unknown Source)

The most likely cause is that the jar is not being found.
Where did you put it?

I see I said to add the jar to the classpath - that's misleading, as
the classpath is ignored when -jar is used. The jar just needs to be
put in one of  the directories JMeter searches, i.e.

lib
or
lib/ext

Best to put it in lib; lib/ext is used for JMeter jars.

>  ???
> >
> > >
> > > On Wed, 23 Feb 2005 12:57:48 +0000, "sebb" <[EMAIL PROTECTED]> said:
> > > > On Wed, 23 Feb 2005 02:51:49 -0800, Jmeter Dev
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > After I found out that JMeter does not support Log4J (guys, you can
> > > > > omit the log4j.conf file. it just confuse us, users), I'm trying to 
> > > > > add
> > > >
> > > > It is still required, as far as I know. It's just not used in earnest.
> > > > Besides, it we are to add log4j support, it will be needed again.
> > > >
> > > > > this support by mayself.
> > > >
> > > > Why?
> > > >
> > > > If you do want to add log4j support, it should be done via Commons
> > > > Logging, not directly, because then users can actually change the
> > > > logging package very easily.
> > > >
> > > > Migrating to Commons Logging is on my TODO (one day) list ...
> > > >
> > > > Apache HTTPClient uses Commons Logging, so all the jars are present
> > > > anyway.
> > > >
> > > > >
> > > > > After importing org.apache.log4j.Logger and writing something like:
> > > > > protected static Logger myLog =
> > > > > Logger.getLogger(MyClass.class.getName());
> > > > > I'm getting this exception during runtime:
> > > > > java.lang.NoClassDefFoundError: org/apache/log4j/Logger
> > > > >         at expansion.extractor.MyClass.<clinit>(MyClass.java:25)
> > > > >         at java.lang.Class.forName0(Native Method)
> > > > >         at java.lang.Class.forName(Unknown Source)
> > > > >
> > > > > any ideas?
> >
> > Try adding log4j to the classpath.
> >
> > > > > Thanks.
> > > > > --
> > > > >   Jmeter Dev
> > > > >   [EMAIL PROTECTED]
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > --
> > >   Jmeter Dev
> > >   [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> --
>   Jmeter Dev
>   [EMAIL PROTECTED]
> 
>

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

Reply via email to