enable logging of rpc calls

pull/1/head
ansuz 8 years ago
parent b7cb1a8d5f
commit d2085c1269

@ -277,6 +277,11 @@ module.exports = {
*/ */
//logFeedback: true, //logFeedback: true,
/* If you wish to see which remote procedure calls clients request,
* set this to true
*/
//logRPC: true,
/* it is recommended that you serve CryptPad over https /* it is recommended that you serve CryptPad over https
* the filepaths below are used to configure your certificates * the filepaths below are used to configure your certificates
*/ */

@ -944,6 +944,7 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function)
if (!Env.msgStore) { Env.msgStore = ctx.store; } if (!Env.msgStore) { Env.msgStore = ctx.store; }
var handleMessage = function (privileged) { var handleMessage = function (privileged) {
if (config.logRPC) { console.log(msg[0]); }
switch (msg[0]) { switch (msg[0]) {
case 'COOKIE': return void Respond(void 0); case 'COOKIE': return void Respond(void 0);
case 'RESET': case 'RESET':

Loading…
Cancel
Save