Logging for prekey fetches, load of log files (#1836)

* Log the files discovered in logPath

I've encountered some logs which include very old entries; and my
suspicion is that we're not cleaning up old log files properly.

* Log prekey fetches (success and failure), just like signed keys

* Force log file information into the final web-ready log
This commit is contained in:
Scott Nonnenberg 2017-11-30 11:56:46 -08:00 committed by GitHub
parent 44da6924f9
commit d9a48478ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

View file

@ -186,11 +186,15 @@
var prekey = new PreKey({id: keyId});
return new Promise(function(resolve) {
prekey.fetch().then(function() {
console.log('Successfully fetched prekey:', keyId);
resolve({
pubKey: prekey.attributes.publicKey,
privKey: prekey.attributes.privateKey
pubKey: prekey.get('publicKey'),
privKey: prekey.get('privateKey'),
});
}).fail(resolve);
}, function() {
console.log('Failed to load prekey:', keyId);
resolve();
});
});
},
storePreKey: function(keyId, keyPair) {