Thanks Charles! I'll give it a try and let you know.

I'm sure it will be something very (*#&*&$ stupid in the end. :(

Cam


-----Original Message-----
From: Charles Tuckey [mailto:[EMAIL PROTECTED]
Sent: March 10, 2004 1:44 PM
To: Log4J Users List
Subject: Re: JUnit and log4j


Hi Cam!

It's so cool that we read the same mailing list. Small world eh? I hear
Psinaptic went public and now has tons of money. :) (I was talking to
whats-his-name at Fujitsu - the marketing guy). Are you hiring?

As to your problem. I use JUnit & log4j together all the time. I've
never had a problem. So I think that something is happening (or not
happening) unbeknownst to you.

I would try setting the "log4j.debug" env. variable (i.e. -Dlog4j.debug
on the java command line) and checking the output. Also, for what it's
worth, I don't use "log4j.logger"; I use "log4j.category". I think I am
behind the times with "category", that's probably not the problem.

charlie

Cameron Roe wrote:
> Thanks Ceki, I had tried that and then went down into the code to try to
> specify the configuration ergo my previous message. So I tried the the
> automatic configuration (with a couple of print statements in both
> ProjectTestSuite and Abbreviation to make sure the system property was
> available) and ProjectTestSuite found the property and configured
correctly,
> yet the lower class still 'yacked'.
>
>
> E:\working\aviation>java -cp
>
./classes;./bin/junit3.7/junit.jar;./bin/jakarta-log4j-1.2.8/dist/lib/log4j-
> 1.2.8.jar -Dlog4j.configura
> tion=file:/e:/working/aviation/log4j.properties
> com.growlingcow.ProjectTestSuite
> log4j.configuration[ProjectTestSuite]
> file:/e:/working/aviation/log4j.properties
> (ProjectTestSuite.java:45) INFO  com.growlingcow.ProjectTestSuite  - In
main
> method for class com.growlingcow.ProjectTestSuite
> log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable
to
> a "org.apache.log4j.Appender" variable.
> log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
> log4j:ERROR [EMAIL PROTECTED] whereas object of
type
> log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by
> [EMAIL PROTECTED]
> log4j:ERROR Could not instantiate appender named "A1".
> log4j:WARN No appenders could be found for logger
> (com.growlingcow.aviation.cfs.data.Abbreviation).
> log4j:WARN Please initialize the log4j system properly.
> log4j.configuration [Abbrev] file:/e:/working/aviation/log4j.properties
> log4j.configuration [Abbrev] file:/e:/working/aviation/log4j.properties
> data/Abbreviations.dat
> data/NOTAMAbbreviations.dat
> fake Key
>
> E:\working\aviation>
>
> where the properties file reads
>
>
> # Set root logger level to DEBUG and its only appender to A1.
> log4j.rootLogger=DEBUG, A1
> #Set logger for abbreviation - make it the same as root
> log4j.logger.com.growlingcow.aviation.cfs.data.Abbreviation=DEBUG,A1
>
> # A1 is set to be a ConsoleAppender.
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>
> # A1 uses PatternLayout.
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>
> #log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
> log4j.appender.A1.layout.ConversionPattern=(%F:%L) %-5p %c %x - %m%n
>
>
> Any ideas?
>
> Thanks!!!
>
> Cam
>
>
>
> -----Original Message-----
> From: Ceki G�lc� [mailto:[EMAIL PROTECTED]
> Sent: March 10, 2004 11:34 AM
> To: Log4J Users List
> Subject: Re: JUnit and log4j
>
>
> Cameron,
>
> I recommend that you use the automatic configuration feature of log4j.
That
> should solve the configuration issues you are experiencing. As for log
> entries appearing multiple times, read the appender additivity section of
> the manual.
>
> HTH,
>
> At 11:02 AM 3/10/2004 -0700, Cameron Roe wrote:
>
>>Does anyone run log4j with JUnit out
>>there???????????????????????????????????????????????????
>>Please let me know how!
>>
>>
>>Cheers
>
>
> --
> Ceki G�lc�
>
>       For log4j documentation consider "The complete log4j manual"
>       ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
>
>
>
> ---------------------------------------------------------------------
> 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]
>
>

--
Charles Tuckey, MSc.
Software Developer
Verano, Inc.
403.299.4765

  � Copyright 2004 Verano Inc. owns copyright content of this document
and all attachments unless otherwise indicated. All rights reserved.
Users of Verano Inc. software and tools associated with the software
such as sales & marketing collateral, presentations, user manuals,
training documentation etc. may not republish nor reproduce in whole or
in part the information, in any form or by any means, in any manner
whatsoever without the prior written permission of Verano Inc., and any
such unauthorized use constitutes copyright infringement. An
acknowledgement of the source must be included whenever Verano Inc.
material is copied or published. If you require further information on a
permitted use or license to reproduce or republish any material, address
your inquiry to Verano Inc.Suite 120, 575 West Street, Mansfield,
Massachusetts, 02048-1164. Any infringement of Verano Inc. rights  will
result in appropriate legal action. Verano Inc. disclaims any and all
liability for any consequences which may result from any unauthorized
reproduction or use of this Work whatsoever.



---------------------------------------------------------------------
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]

Reply via email to