AW: Getting Could not find root logger information but I don't see why

2011-06-06 Thread Stadelmann Josef
Why not adding  
log4j.debug=true 
as first line in your log4j.properties file to see how well your configuration 
records are received!
Josef

-Ursprüngliche Nachricht-
Von: KARR, DAVID (ATTSI) [mailto:dk0...@att.com] 
Gesendet: Donnerstag, 26. Mai 2011 18:49
An: Log4J Users List
Betreff: RE: Getting Could not find root logger information but I don't see 
why

 -Original Message-
 From: Jacob Kjome [mailto:h...@visi.com]
 Sent: Thursday, May 26, 2011 9:35 AM
 To: Log4J Users List
 Subject: Re: Getting Could not find root logger information but I
 don't see why
 
 Is that a literal path?
 
 ...\my.ear\my.war\WEB-INF/log4j.xml

No, the real path information is elided.  This part works fine.

 Also, keep in mind that because you are not [likely] using a logger
 repository
 selector, you will be using the default logger repository unless you
 are using
 child-first, or parent-last, classloading.  If you want per/webapp
 logger
 configuration, this is a must.  Otherwise, you might as well place
 log4j.xml
 in the server's classpath.

This is something I definitely need to get more information about.  I'll read 
the docs on this and work on implementing this.

 And if you aren't doing anything special
 regarding
 setting runtime properties for you configuration to use, then it is
 rather
 pointless to use a custom Log4j init servlet.  Just place log4j.xml in
 WEB-INF/classes and be done.  Log4j will automatically pick this up and
 use
 it.

Yeah, I'm aware of that, and once I eliminate some other issues, I plan on 
eliminating that.  However, I may have a classpath issue that may end up 
requiring this.  I'm not sure.  Due to some other constraints, I appear to be 
forced to have my log4j.jar at both the EAR and WAR classpath level.  In my 
WebLogic config, I'm doing everything I can to make it prefer the jars in the 
webapp.

 
 
 Jake
 
 On Thu, 26 May 2011 01:27:42 +
  KARR, DAVID (ATTSI) dk0...@att.com wrote:
  Using log4j 1.2.16 in WebLogic 10.3.2.
 
  While my app is starting up, I'm seeing the following message:
 
  Log4JInitServlet is initializing log4j
  Initializing log4j with: ...\my.ear\my.war\WEB-INF/log4j.xml
  log4j: Could not find root logger information. Is this OK?
 
  This is the log4j.xml file it's reading:
  -
  ?xml version=1.0 encoding=UTF-8 ?
  !DOCTYPE log4j:configuration SYSTEM
 http://jakarta.apache.org/log4j.dtd;
  log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
 appender name=consoleAppender
 class=org.apache.log4j.ConsoleAppender
 layout class=org.apache.log4j.TTCCLayout/
 /appender
 logger name=org.springframework additivity=false
 level value=warn/
 appender-ref ref=consoleAppender/
 /logger
 logger name=org.apache.cxf additivity=false
 level value=warn/
 appender-ref ref=consoleAppender/
 /logger
 root
 priority value =warn /
 appender-ref ref=consoleAppender/
 /root
  /log4j:configuration
  -
 
  I don't see anything wrong with this.
 
  -
  To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail: log4j-user-h...@logging.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail: log4j-user-h...@logging.apache.org


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



RE: Getting Could not find root logger information but I don't see why

2011-05-26 Thread KARR, DAVID (ATTSI)
 -Original Message-
 From: KARR, DAVID (ATTSI)
 Sent: Wednesday, May 25, 2011 6:28 PM
 To: log4j-user@logging.apache.org
 Subject: Getting Could not find root logger information but I don't
 see why
 
 Using log4j 1.2.16 in WebLogic 10.3.2.
 
 While my app is starting up, I'm seeing the following message:
 
 Log4JInitServlet is initializing log4j
 Initializing log4j with: ...\my.ear\my.war\WEB-INF/log4j.xml
 log4j: Could not find root logger information. Is this OK?

Never mind.  This is the message you would see when you try to call 
PropertyConfigurator on a log4j.xml file.  Brain damage repaired.

 This is the log4j.xml file it's reading:
 -
 ?xml version=1.0 encoding=UTF-8 ?
 !DOCTYPE log4j:configuration SYSTEM
 http://jakarta.apache.org/log4j.dtd;
 log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
 appender name=consoleAppender
 class=org.apache.log4j.ConsoleAppender
 layout class=org.apache.log4j.TTCCLayout/
 /appender
 logger name=org.springframework additivity=false
 level value=warn/
 appender-ref ref=consoleAppender/
 /logger
 logger name=org.apache.cxf additivity=false
 level value=warn/
 appender-ref ref=consoleAppender/
 /logger
 root
 priority value =warn /
 appender-ref ref=consoleAppender/
 /root
 /log4j:configuration
 -
 
 I don't see anything wrong with this.
 
 -
 To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail: log4j-user-h...@logging.apache.org


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Getting Could not find root logger information but I don't see why

2011-05-26 Thread Jacob Kjome

Is that a literal path?

...\my.ear\my.war\WEB-INF/log4j.xml

First, it's invalid since it has 3 periods, rather than 1 or 2.  Second, your 
slashes are inconsistent.  If you want to be agnostic to the OS, just always 
use forward slashes (/), which will work under both Unix and Windows in 
Java.  Third, when using relative paths, the path is going to be relative to 
the directory from which the JVM started.  So, let's say this is...


${weblogic.home}/server/bin

Log4j would be looking for your file in

${weblogic.home}/server/my.ear/my.war/WEB-INF/log4j.xml

...which is almost certainly incorrect.

Also, keep in mind that because you are not [likely] using a logger repository 
selector, you will be using the default logger repository unless you are using 
child-first, or parent-last, classloading.  If you want per/webapp logger 
configuration, this is a must.  Otherwise, you might as well place log4j.xml 
in the server's classpath.  And if you aren't doing anything special regarding 
setting runtime properties for you configuration to use, then it is rather 
pointless to use a custom Log4j init servlet.  Just place log4j.xml in 
WEB-INF/classes and be done.  Log4j will automatically pick this up and use 
it.



Jake

On Thu, 26 May 2011 01:27:42 +
 KARR, DAVID (ATTSI) dk0...@att.com wrote:

Using log4j 1.2.16 in WebLogic 10.3.2.

While my app is starting up, I'm seeing the following message:

Log4JInitServlet is initializing log4j
Initializing log4j with: ...\my.ear\my.war\WEB-INF/log4j.xml
log4j: Could not find root logger information. Is this OK?

This is the log4j.xml file it's reading:
-
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE log4j:configuration SYSTEM http://jakarta.apache.org/log4j.dtd;
log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
appender name=consoleAppender 
class=org.apache.log4j.ConsoleAppender

layout class=org.apache.log4j.TTCCLayout/
/appender
logger name=org.springframework additivity=false
level value=warn/
appender-ref ref=consoleAppender/
/logger
logger name=org.apache.cxf additivity=false
level value=warn/
appender-ref ref=consoleAppender/
/logger
root
priority value =warn /
appender-ref ref=consoleAppender/
/root
/log4j:configuration
-

I don't see anything wrong with this.

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org





-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



RE: Getting Could not find root logger information but I don't see why

2011-05-26 Thread KARR, DAVID (ATTSI)
 -Original Message-
 From: Jacob Kjome [mailto:h...@visi.com]
 Sent: Thursday, May 26, 2011 9:35 AM
 To: Log4J Users List
 Subject: Re: Getting Could not find root logger information but I
 don't see why
 
 Is that a literal path?
 
 ...\my.ear\my.war\WEB-INF/log4j.xml

No, the real path information is elided.  This part works fine.

 Also, keep in mind that because you are not [likely] using a logger
 repository
 selector, you will be using the default logger repository unless you
 are using
 child-first, or parent-last, classloading.  If you want per/webapp
 logger
 configuration, this is a must.  Otherwise, you might as well place
 log4j.xml
 in the server's classpath.

This is something I definitely need to get more information about.  I'll read 
the docs on this and work on implementing this.

 And if you aren't doing anything special
 regarding
 setting runtime properties for you configuration to use, then it is
 rather
 pointless to use a custom Log4j init servlet.  Just place log4j.xml in
 WEB-INF/classes and be done.  Log4j will automatically pick this up and
 use
 it.

Yeah, I'm aware of that, and once I eliminate some other issues, I plan on 
eliminating that.  However, I may have a classpath issue that may end up 
requiring this.  I'm not sure.  Due to some other constraints, I appear to be 
forced to have my log4j.jar at both the EAR and WAR classpath level.  In my 
WebLogic config, I'm doing everything I can to make it prefer the jars in the 
webapp.

 
 
 Jake
 
 On Thu, 26 May 2011 01:27:42 +
  KARR, DAVID (ATTSI) dk0...@att.com wrote:
  Using log4j 1.2.16 in WebLogic 10.3.2.
 
  While my app is starting up, I'm seeing the following message:
 
  Log4JInitServlet is initializing log4j
  Initializing log4j with: ...\my.ear\my.war\WEB-INF/log4j.xml
  log4j: Could not find root logger information. Is this OK?
 
  This is the log4j.xml file it's reading:
  -
  ?xml version=1.0 encoding=UTF-8 ?
  !DOCTYPE log4j:configuration SYSTEM
 http://jakarta.apache.org/log4j.dtd;
  log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
 appender name=consoleAppender
 class=org.apache.log4j.ConsoleAppender
 layout class=org.apache.log4j.TTCCLayout/
 /appender
 logger name=org.springframework additivity=false
 level value=warn/
 appender-ref ref=consoleAppender/
 /logger
 logger name=org.apache.cxf additivity=false
 level value=warn/
 appender-ref ref=consoleAppender/
 /logger
 root
 priority value =warn /
 appender-ref ref=consoleAppender/
 /root
  /log4j:configuration
  -
 
  I don't see anything wrong with this.
 
  -
  To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail: log4j-user-h...@logging.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail: log4j-user-h...@logging.apache.org


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: Getting Could not find root logger information but I don't see why

2011-05-26 Thread Jacob Kjome


Due to some other constraints, I appear to be 
forced to have my log4j.jar at both the EAR and WAR classpath level.  In my 
WebLogic config, I'm doing everything I can to make it prefer the jars in 
the webapp.




If you are using Weblogic 9.2+, then you may be able to use a 
FilteringClassLoader [1], so that application library contents of the EAR 
file are loaded in preference to those from the server  classpath.  In 
META-INF/weblogic-application.xml you'd add the following


prefer-application-packages
    package-nameorg.apache.log4j.*/package-name
/prefer-application-packages

You'd simply make sure to place log4j.jar in the EAR's APP-INF/lib or add it 
as a manifest Class-Path entry in the EAR's manifest.mf.  Note that I haven't 
verified whether this actually achieves per/app  logging configuration.  Maybe 
you can try it out and report results?


[1] 
http://download.oracle.com/docs/cd/E13222_01/wls/docs92/programming/classloading.html#wp1097187



Jake

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



RE: Getting Could not find root logger information but I don't see why

2011-05-26 Thread KARR, DAVID (ATTSI)
 -Original Message-
 From: Jacob Kjome [mailto:h...@visi.com]
 Sent: Thursday, May 26, 2011 2:15 PM
 To: Log4J Users List
 Subject: Re: Getting Could not find root logger information but I
 don't see why
 
 
 Due to some other constraints, I appear to be
 forced to have my log4j.jar at both the EAR and WAR classpath
 level.  In my
 WebLogic config, I'm doing everything I can to make it prefer the
 jars in
 the webapp.
 
 
 If you are using Weblogic 9.2+, then you may be able to use a
  FilteringClassLoader [1], so that application library contents of the
 EAR
 file are loaded in preference to those from the server  classpath.  In
 META-INF/weblogic-application.xml you'd add the following
 
 prefer-application-packages
     package-nameorg.apache.log4j.*/package-name
 /prefer-application-packages
 
 You'd simply make sure to place log4j.jar in the EAR's APP-INF/lib or
 add it
 as a manifest Class-Path entry in the EAR's manifest.mf.  Note that I
 haven't
 verified whether this actually achieves per/app  logging
 configuration.  Maybe
 you can try it out and report results?

This whole issue became somewhat moot when I discovered that the other library, 
which said it uses Log4J, is actually directly using java.util.logging, so I 
was able to implement a separate configuration setup for that.

However, it's only a matter of time before we end up with more than one webapp 
using log4j.  I'll have to dive into this again when we get to that point.

I'm familiar with all of the prefer elements in WebLogic's config, so we'll 
see what happens.

 
 [1]
 http://download.oracle.com/docs/cd/E13222_01/wls/docs92/programming/cla
 ssloading.html#wp1097187
 
 
 Jake
 
 -
 To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail: log4j-user-h...@logging.apache.org


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Getting Could not find root logger information but I don't see why

2011-05-25 Thread KARR, DAVID (ATTSI)
Using log4j 1.2.16 in WebLogic 10.3.2.

While my app is starting up, I'm seeing the following message:

Log4JInitServlet is initializing log4j
Initializing log4j with: ...\my.ear\my.war\WEB-INF/log4j.xml
log4j: Could not find root logger information. Is this OK?

This is the log4j.xml file it's reading:
-
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE log4j:configuration SYSTEM http://jakarta.apache.org/log4j.dtd;
log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
appender name=consoleAppender class=org.apache.log4j.ConsoleAppender
layout class=org.apache.log4j.TTCCLayout/
/appender
logger name=org.springframework additivity=false
level value=warn/
appender-ref ref=consoleAppender/
/logger
logger name=org.apache.cxf additivity=false
level value=warn/
appender-ref ref=consoleAppender/
/logger
root
priority value =warn /
appender-ref ref=consoleAppender/
/root
/log4j:configuration
-

I don't see anything wrong with this.

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org