Because the request is generated in a library not an application. The
library has no concept of what container it is running in or where it
should save files. I felt log4j was the best solution for this as it
allows me to turn this on and off at will and goes with the trace info
I have in there already.

On 11/9/06, Maarten Bosteels <[EMAIL PROTECTED]> wrote:
Why don't you just save the request and the response to a file ?
You do not need log4j for that, right ?

      DateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss-S");
      String filename = "/tmp/" + df.format(new Date()) + "-request.xml";
      FileWriter writer = new FileWriter(filename);
      writer.write(request);
      writer.close();

If you need to specify the charset use

    OutputStreamWriter writer = new OutputStreamWriter(new
FileOutputStream(filename), "UTF-8");


Maarten


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

Reply via email to