We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I need to see what actually is send and received when something is failing, I review the code and see like that is no logging for this.
the code is pretty simple to implements:
make a decorator Writer:
private class EchoWriter extends Writer { Writer out; StringBuilder buf = new StringBuilder(); public EchoWriter(Writer out) { this.out = out; } public void write(String b) throws IOException { buf.append(b); out.write(b); } public void write(int b) throws IOException { buf.append((char)b); out.write(b); } public void write(char[] b) throws IOException { //System.out.print(b); out.write(b); } public void write(String b, int offset, int len) throws IOException { //System.out.print(b); out.write(b, offset, len); } public void write(char[] b, int offset, int len) throws IOException { //System.out.print(b); out.write(b, offset, len); } public void close() throws IOException { out.close(); } public void flush() throws IOException { System.out.println(buf.toString()); //logging start here System.out.println("-----------------"); buf = new StringBuilder(); out.flush(); } }
add it to
MXSerializer.java
out = new EchoWriter(new OutputStreamWriter(os));
and that it !
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I need to see what actually is send and received when something is failing, I review the code and see like that is no logging for this.
the code is pretty simple to implements:
make a decorator Writer:
add it to
MXSerializer.java
out = new EchoWriter(new OutputStreamWriter(os));
and that it !
The text was updated successfully, but these errors were encountered: