Maybe you can use a PrintWriter ?

On Fri, Feb 26, 2010 at 12:51 PM, ctasada <[email protected]> wrote:

> Hi guys,
>
> I've just recently started to use gwt-log in a project and so far is
> working as expected :) But I've a problem that I cannot see how to
> solve.
>
> In my server side code I'm parsing some XML messages and I would love
> to have them in the log (for easier debugging), but I don't find how
> to do that.
>
> That's my code:
> public static void serialize(Document doc, OutputStream out) {
>        TransformerFactory tfactory =
> TransformerFactory.newInstance();
>        Transformer serializer;
>        try {
>            serializer = tfactory.newTransformer();
>            //Setup indenting to "pretty print"
>            serializer.setOutputProperty(OutputKeys.INDENT, "yes");
>            serializer.setOutputProperty("{http://xml.apache.org/xslt}
> indent-amount", "2");
>
>            serializer.transform(new DOMSource(doc), new
> StreamResult(out));
>        } catch (TransformerException e) {
>                Log.debug(e.getMessage());
>        }
> }
>
> Right now I'm sending to this method the System.out as OutputStream,
> but I would need the Log OutputStream or Writer.
>
> Any idea?
>
> Thanks a lot.
>
> --
> You received this message because you are subscribed to the Google Groups
> "gwt-log" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<gwt-log%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/gwt-log?hl=en.
>
>


-- 
Fred Sauer
Developer Advocate
Google Inc.
1600 Amphitheatre Parkway
Mountain View, CA 94043
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"gwt-log" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/gwt-log?hl=en.

Reply via email to