That's exactly what I was looking for :) Thanks a lot!!!!
On Mar 7, 1:07 pm, Fred Sauer <[email protected]> wrote: > Perhaps you > wanthttp://java.sun.com/j2se/1.4.2/docs/api/java/io/ByteArrayOutputStream... > then call log the contents of the toString() method. > > > > On Tue, Mar 2, 2010 at 7:24 PM, ctasada <[email protected]> wrote: > > Umm, may work. But I don't find how to do it :( > > > The gwt-log doesn't seem to return any Object that I can use with the > > PrintWriter. > > > Does anyone has any piece of code that I can use? > > > Thanks. > > > On Feb 27, 10:47 am, Fred Sauer <[email protected]> wrote: > > > 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]> > > <gwt-log%[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]<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.
