Perry Hoekstra wrote:

> Blacha, Bart wrote:
> 
>> Beats me...  I'm quite new to log4j and I've never seen
>> such behavior. Sorry.  Hope someone else on the list can help you.
>>
>> If all else fails, the beauty of open source is, we can hack the 
>> source and see how it works :-)
>>
>> -Bart
> 
> 
> 
> Do you have to have a log4j.properties if you defined a configuration 
> file?  I turned on LogLog for Log4J initialization and this is what I 
> received:
> 
> log4j: Trying to find [log4j.properties] using 
> sun.misc.Launcher$AppClassLoader@
> 4afa9e class loader.
> log4j: Trying to find [log4j.properties] using 
> ClassLoader.getSystemResource().
> log4j: Could not find resource: [log4j.properties].
> new Category: [org.apache.log4j.Category@7e9bf]
> log4j: System property is :weblogic.xml.jaxp.RegistryDocumentBuilderFactory
> log4j: Standard DocumentBuilderFactory search succeded.
> log4j: DocumentBuilderFactory is: 
> weblogic.xml.jaxp.RegistryDocumentBuilderFacto
> ry
> log4j: URL to log4j.dtd is 
> [jar:file:/user/hoeksp1/bea/wl6.0/lib/third_party/log
> 4j.jar!/org/apache/log4j/xml/log4j.dtd].
> log4j: debug attribute= "null".
> log4j: Ignoring debug attribute.
> log4j: Disable override="null".
> log4j: Disable ="null".
> log4j: Priority value for root is  [debug].
> log4j: root priority set to DEBUG
> log4j: Class name: [org.apache.log4j.FileAppender]
> log4j: Setting property [file] to [config/internet/logs/debug.log].
> log4j: Setting property [append] to [false].
> log4j: Parsing layout of class: "org.apache.log4j.TTCCLayout"
> log4j: Setting property [dateFormat] to [ISO8601].
> log4j: Setting property [priorityToMatch] to [DEBUG].
> log4j: Setting property [acceptOnMatch] to [true].
> log4j: Adding appender named [file_debug] to category [root].
> log4j: Class name: [com.medtronic.weblogic.WebLogicLogAppender]
> log4j: Parsing layout of class: "org.apache.log4j.TTCCLayout"
> log4j: Setting property [dateFormat] to [ISO8601].
> log4j: Setting property [priorityToMatch] to [INFO].
> log4j: Setting property [acceptOnMatch] to [true].
> log4j: Adding appender named [weblogic_info] to category [root].
> log4j: Class name: [com.medtronic.weblogic.WebLogicLogAppender]
> log4j: Parsing layout of class: "org.apache.log4j.TTCCLayout"
> log4j: Setting property [dateFormat] to [ISO8601].
> log4j: Setting property [priorityToMatch] to [WARN].
> log4j: Setting property [acceptOnMatch] to [true].
> log4j: Adding appender named [weblogic_warn] to category [root].
> log4j: Class name: [com.medtronic.weblogic.WebLogicLogAppender]
> log4j: Parsing layout of class: "org.apache.log4j.TTCCLayout"
> log4j: Setting property [dateFormat] to [ISO8601].
> log4j: Setting property [priorityToMatch] to [ERROR].
> log4j: Setting property [acceptOnMatch] to [true].
> log4j: Adding appender named [weblogic_error] to category [root].
> 

Doh!

I think I found my problem.  I have been trying out the Jakarta Cactus 
testing framework.  Because I had LogLog on, I found this in my server log:

log4j: Parsing for [root] with value=[DEBUG, cactus].
log4j: Priority token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Parsing appender named "cactus".
log4j: Parsing layout options for "cactus".
log4j: Setting property [conversionPattern] to [%r [%t] %-5p %c{2} %x - 
%m %n].
log4j: End of parsing for "cactus".
log4j: Setting property [append] to [false].
log4j: Setting property [file] to [cactus_server.log].
log4j: Parsed "cactus" options.
log4j: Finished configuring.

and I found my logging statements in the cactus_server.log file.

Cactus' log4j configuration was blowing away my own app's log4j 
configuration.

-- 
Perry Hoekstra
E-Commerce Architect
Talent Software Services
[EMAIL PROTECTED]


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

Reply via email to