Skip to content

Partial redirection of System.out #1

@ceki

Description

@ceki

Hello,

I am trying to use sysout-over-slf4j in order to redirect SOAP messages printed by the com.sun.xml.ws.transport.http.client.HttpTransportPipe class on System.out. This class directly invokes the System.out.println(String) method which is redirected just fine. However, HttpTransportPipe also invokes the Ssytem.out.write((byte b[], int off, int len) method which unfortunately is not redirected. It turns out that data I am actually interested in is output in that invocation. Anyway, looking at the SLF4JPrintStreamImpl class the culprit seems to be:

264 @OverRide
265 public void write(final byte[] buf, final int off, final int len) {
266 originalPrintStream.write(buf, off, len);
267 }

For some reason, this method seems to invoke the original stream instead of redirecting to SLF4J. Could you please shed some light on the matter?

See also: http://projects.lidalia.org.uk/sysout-over-slf4j/xref/uk/org/lidalia/sysoutslf4j/system/SLF4JPrintStreamImpl.html#266

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions