configure Log4j to use ConsoleAppender
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.rootLogger=debug, stdoutimport org.apache.log4j.Logger;
...
private static org.apache.log4j.Logger log = Logger
.getLogger(YourClassNameGoesHere.class);
and when use you call log.debug("foo");
you will see the debug statements on screen
documentation is available at
http://www.onjava.com/pub/a/onjava/2002/08/07/log4j.html?page=3
you can also use Log4J Category as in this example..
static Category cat =
Category.getInstance(YOURClassNameGoesHere.class.getName());
//now test the various debugging capabilities of the logger as explained here
cat.info("Just testing a log message with priority set to INFO");
cat.warn("Just testing a log message with priority set to WARN");
cat.error("Just testing a log message with priority set to ERROR");
cat.fatal("Just testing a log message with priority set to FATAL")HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business
of Sender. This transmission is of a confidential nature and Sender does not
endorse distribution to any party other than intended recipient. Sender does
not necessarily endorse content contained within this transmission.
From: [EMAIL PROTECTED]
To: [email protected]
Subject: RE: Get XML REquest File
Date: Sat, 27 Sep 2008 18:17:39 -0400
I am using Axis2 as the client. The server is not controlled by me. I want to
spit the XML request I am sending to the server. Can you please tell me how to
do that?
(My request fails and the server person wants me to send the request XML to him
so he can see what went wrong? )
Thanks for replying!
> Date: Sat, 27 Sep 2008 09:22:30 -0400
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: Get XML REquest File
>
>
> > Hello,
> > How do I get the XML version of the request the client is sending to
> > the web service? The client is using Axis 2.
> If you are using Axis2 as the server , then you can write your service
> using Axiom. Then you can get the XML as the input parameter. With this
> your service would look like,
>
> public class MyService {
>
> public void doFoo(OMElement parameter){
> // do your service logic here
> }
>
> }
> >
> Thank you!
>
>
> http://blogs.deepal.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
See how Windows Mobile brings your life together—at home, work, or on the go.
See Now
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/