Adjusted logging locations and levels

This commit is contained in:
2020-02-18 16:34:14 +01:00
parent 9c73289bda
commit aaa6044ade
8 changed files with 9 additions and 11 deletions

View File

@@ -77,8 +77,8 @@ public class Client implements Closeable {
receiver = new Receiver(socket.getInputStream());
// Register user creation processor, contact list processor and message cache
receiver.registerProcessor(User.class, sender -> { logger.info("Acquired user object " + sender); this.sender = sender; });
receiver.registerProcessor(Contacts.class, contacts -> { logger.info("Acquired contacts object " + contacts); this.contacts = contacts; });
receiver.registerProcessor(User.class, sender -> this.sender = sender);
receiver.registerProcessor(Contacts.class, contacts -> this.contacts = contacts);
receiver.registerProcessor(Message.class, receivedMessageCache);
receiver.registerProcessor(HandshakeRejectionEvent.class, evt -> { rejected = true; EventBus.getInstance().dispatch(evt); });
@@ -88,7 +88,6 @@ public class Client implements Closeable {
new Thread(receiver).start();
// Write login credentials
logger.finest("Sending login credentials...");
SerializationUtils.writeBytesWithLength(credentials, socket.getOutputStream());
// Wait for a maximum of five seconds to acquire the sender object
@@ -225,6 +224,7 @@ public class Client implements Closeable {
private void writeObject(Object obj) throws IOException {
checkOnline();
logger.fine("Sending object " + obj);
SerializationUtils.writeBytesWithLength(obj, socket.getOutputStream());
}