axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stadelmann Josef" <josef.stadelm...@axa-winterthur.ch>
Subject AW: [axis2-1.6.1] why log4j and Jdk14 loggers in the same system?
Date Tue, 03 Apr 2012 15:21:54 GMT
The solution to my problem mentioned below is, 

 

have the 

axis2-1.6.1/samples/jaxws-samples/SampleClient.java 
perform a log4j based logging activity i.e. to trace and debug in axis2
code, 


I have changed in my NetBeans 7.1.1 / project Node / properties /
Actions / Debug file via main() the first line 

 

exec.args=-Xdebug
-Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLo
gger -Dlog4j.debug
-Dlog4j.configuration=file:/E:/Users/C770817/SW-UMGEBUNG/axis2-1.6.1/lib
/log4j.properties -classpath %classpath ${packageClassName}

 

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLo
gger makes your client code using log4j loggers and not Jdk14loggers
(the default)

-Dlog4j.debug makes tracing the log4j.properties file

-Dlog4j.configuration=file:/E:/Users/C770817/SW-UMGEBUNG/axis2-1.6.1/lib
/log4j.properties makes the path (absolute) known to my log4j.properties

 

Now, when you press Right Mouse Button Down on SampleClient (project
node ) and select for DEBUG, and because this is a maven project, the
Action gets executed as set for Debug file via main()



I hope this helps others too, and it took me a few hours to get it out

 

Josef

 

Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch] 
Gesendet: Dienstag, 3. April 2012 12:13
An: java-user@axis.apache.org
Betreff: AW: [axis2-1.6.1] why log4j and Jdk14 loggers in the same
system?

 

I think I was somehow wrong. Sorry.

So far I have configured log4j in log4j.properties for the tomcat
environment by placing log4j.properties at Tomcat and Axis2 classpath.
So log4j works properly.

But NOW I am at client side, any maybe someone can tell me how to make,
that I can use, log4j loggers at client side when I start the
jaxws-samples/SampleClient in debug mode?

Josef

 

Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch] 
Gesendet: Dienstag, 3. April 2012 11:40
An: java-user@axis.apache.org
Betreff: [axis2-1.6.1] why log4j and Jdk14 loggers in the same system?

 

Why does 

public class org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler
extends BindingProvider implements

        InvocationHandler {

    private static Log log = LogFactory.getLog(JAXWSProxyHandler.class);

engage a Jdk14Logger and break all my log4j setups?

I went deep on debugging and turning on log4j loggers as I need em. They
all work. Today I encountered during debugging the statement above and
went to add a log4j logger.

However no output ws generated because debug is always false. Then I
detected that I was wrong and the logger above is in fact a Jdk14
logger. 

Is there a known way to configure for booth type of loggers? 

Please help or correct this with a future version, I can not see any
good to have two different logger systems engaged in a single already
complex system.

Josef


Mime
View raw message