Adding stream loggers

This commit is contained in:
dcollin 2015-10-29 17:55:35 +01:00
parent 995e63dd17
commit fb2f5e048a

View file

@ -8,7 +8,9 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import zutil.Hasher;
import zutil.log.InputStreamLogger;
import zutil.log.LogUtil;
import zutil.log.OutputStreamLogger;
import zutil.parser.json.JSONObjectInputStream;
import zutil.parser.json.JSONObjectOutputStream;
@ -135,9 +137,9 @@ public class Session extends Thread {
///////////// CLEARTEXT CONNECTION //////////////////////
// We dont create any buffers here as these streams might be replaced by encrypted ones
in = new JSONObjectInputStream(socket.getInputStream());
in = new JSONObjectInputStream(new InputStreamLogger(socket.getInputStream()));
in.registerRootClass(CoderMessage.class);
out = new JSONObjectOutputStream(socket.getOutputStream());
out = new JSONObjectOutputStream(new OutputStreamLogger(socket.getOutputStream()));
out.enableMetaData(false);
//Send AuthenticationReq