Log the disconnect diagnostic info that etherpad still sends. Maybe thats usefull

pull/40/merge
Peter 'Pita' Martischka 2011-07-25 16:31:41 +01:00
parent e9a389b0a6
commit 1067d17381
1 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,7 @@ var async = require('async');
var express = require('express');
var path = require('path');
var minify = require('./minify');
var formidable = require('formidable');
var exportHandler;
var importHandler;
var exporthtml;
@ -217,6 +218,17 @@ async.waterfall([
importHandler.doImport(req, res, req.params.pad);
});
//The Etherpad client side sends information about how a disconnect happen
//I don't know how to use them, but maybe there usefull, so we should print them out to the log
app.post('/ep/pad/connection-diagnostic-info', function(req, res)
{
new formidable.IncomingForm().parse(req, function(err, fields, files)
{
console.log(new Date().toUTCString() + ": DIAGNOSTIC-INFO: " + fields.diagnosticInfo);
res.end("OK");
});
});
//serve index.html under /
app.get('/', function(req, res)
{