Adjusted logging locations and levels
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user