aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEv Bogue <ev@evbogue.com>2019-04-04 10:34:04 -0500
committerEv Bogue <ev@evbogue.com>2019-04-04 10:34:04 -0500
commit8319cbedf4fcc423bf56df55ef0d24ffe85a23fe (patch)
tree3c5a7a1769f2674df37e55d6b2379eb2c57def36
parent59e0b7d43d282b6c2c4ca1ce90b41e0abfe39ff7 (diff)
log requests for publicKeys
-rw-r--r--server.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/server.js b/server.js
index dabea47..30b13bc 100644
--- a/server.js
+++ b/server.js
@@ -36,24 +36,24 @@ wss.on('connection', function (ws) {
log: serverLog
}
ws.send(JSON.stringify(sendingLog))
- console.log('SENT LOG TO CLIENT')
+ console.log('SENT ' + publicKey + ' TO CLIENT')
}
// if server log has less entries than the log sent by the client, write it to the server
if (serverLog.length < clientLog.length) {
fs.writeFile(__dirname + '/bogs/' + publicKey, JSON.stringify(clientLog), function (err) {
if (err) throw err
- console.log('SAVED LOG TO SERVER')
+ console.log('SAVED ' + publicKey + ' TO SERVER')
})
}
// if logs are identical, do nothing
if (serverLog.length == clientLog.length) {
- console.log('LOGS ARE THE SAME')
+ console.log(publicKey + ': LOGS ARE THE SAME')
}
// if log doesn't already exist, write it
} else {
fs.writeFile(__dirname + '/bogs/' + publicKey, JSON.stringify(clientLog), function (err) {
if (err) throw err
- console.log('SAVED LOG TO SERVER')
+ console.log('SAVED ' + publicKey + ' TO SERVER')
})
}
}