Thanks Jake

I thought I was using log4j-1.2.12 but I had also log4j-1.3alpha-7 somewhere in my classpath because I forgot to delete it after some tests. But your suggestion is working with the alpha release if someone else has the same "problem" in the future.

Thanks  again Jake. You saved my week :-)


On 29.11.2005, at 14:01, Jacob Kjome wrote:


I take it you are using Logj4-1.3alpha. Which one? I suggest using the latest alpha7. However, if you aren't specifically using anything that Log4j-1.2.xx doesn't already provide, I suggest going with that rather than 1.3alpha builds.

Anyway, 1.3alpha uses itself to log. That means that if you set the root logger to "DEBUG", you will get debugging from all libraries, including log4j itself, using Log4j or commons-logging fronting Log4j. I doubt this is what you really want. I suggest changing your config to set the root logger to something like "WARN" and then specifically create another logger for your own hierarchy to
log with greater verbosity.  So...


log4j.rootLogger=WARN, A1
log4j.logger.com.mycompany=DEBUG
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %p (%F %L) - %m%n



Jake

Quoting Ivan Subotic <[EMAIL PROTECTED]>:

Dear list

Maybe it is supposed to be like that, but I will ask anyway:

In my Application at startup if I use "BasicConfigurator.configure()"
I get the following console output:



[Session started at 2005-11-29 11:47:55 +0100.]
*** configurationOptionStr=null
** End of LogManager static initializer
log4j:INFO Creating new logger [distarnet] in repository [default].
No valid config file given: <null_4000>, using system defaults!
Nov 29, 2005 11:47:56 AM distarnet main
INFO: Distarnet started
0 [main] INFO distarnet null - CONFIG PORT: 5000
34 [main] INFO distarnet null - SERVER PORT: 4000
49 [main] INFO distarnet null - Starting Internet listener...




Now I want to use the following configuration file:

        log4j.rootLogger=DEBUG, A1
        log4j.appender.A1=org.apache.log4j.ConsoleAppender
        log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %p (%F %L) - %m%n


and this gives me the following output:


distarnet has exited with status 0.
[Session started at 2005-11-29 12:07:30 +0100.]
*** configurationOptionStr=null
** End of LogManager static initializer
log4j:INFO Creating new logger [distarnet] in repository [default].
log4j:INFO Creating new logger [org.apache.log4j] in repository
[default].
log4j:INFO Creating new logger
[org.apache.log4j.PropertyConfigurator] in repository [default].
0 [main] ERROR org.apache.log4j.varia.ListAppender - Attempted to log
with inactive appender named [TEMP_LIST_APPENDER].
log4j:INFO Returning existing logger
[org.apache.log4j.PropertyConfigurator] in repository [default].
1 [main] ERROR org.apache.log4j.varia.ListAppender - Attempted to log
with inactive appender named [TEMP_LIST_APPENDER].
log4j:INFO Returning existing logger
[org.apache.log4j.PropertyConfigurator] in repository [default].
1 [main] ERROR org.apache.log4j.varia.ListAppender - Attempted to log
with inactive appender named [TEMP_LIST_APPENDER].
log4j:INFO Returning existing logger
[org.apache.log4j.PropertyConfigurator] in repository [default].
log4j:INFO Returning existing logger
[org.apache.log4j.PropertyConfigurator] in repository [default].
log4j:INFO Creating new logger
[org.apache.log4j.config.PropertySetter] in repository [default].
log4j:INFO Returning existing logger
[org.apache.log4j.PropertyConfigurator] in repository [default].
log4j:INFO Returning existing logger
[org.apache.log4j.PropertyConfigurator] in repository [default].
log4j:INFO Returning existing logger
[org.apache.log4j.PropertyConfigurator] in repository [default].
log4j:INFO Returning existing logger [org.apache.log4j] in repository
[default].
No valid config file given: <null_4000>, using system defaults!
Nov 29, 2005 12:07:31 PM distarnet main
INFO: Distarnet started
301  [main] INFO (distarnet.java 145) - CONFIG PORT: 5000
324  [main] INFO (distarnet.java 168) - SERVER PORT: 4000
326  [main] INFO (distarnet.java 170) - Starting Internet listener...



THE QUESTION:
Why do I get all those info and error messages (row 5-19),
respectively how do I get rid of them?

Best regards
Ivan Subotic



---
Ivan Subotic, lic. rer. pol.
Imaging and Media Lab, University of Basel
Bernoullistrasse 30-32
CH-4056 Basel, Switzerland

Tel.: (+41) (0)61 267 04 88
Fax.: (+41) (0)61 267 04 85
http://www.abmt.unibas.ch


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




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

Reply via email to