mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Restored the errorlog function, fixes a bug
This commit is contained in:
parent
eadc8fcf3b
commit
42dfb31cf8
1 changed files with 18 additions and 2 deletions
|
@ -16,8 +16,6 @@
|
|||
|
||||
require('joose');
|
||||
|
||||
//var http = require('http')
|
||||
//var url = require('url')
|
||||
var socketio = require('socket.io')
|
||||
var settings = require('./settings')
|
||||
var db = require('./db')
|
||||
|
@ -120,6 +118,24 @@ async.waterfall([
|
|||
}
|
||||
]);
|
||||
|
||||
function errorlog(e)
|
||||
{
|
||||
var timeStr = new Date().toUTCString() + ": ";
|
||||
|
||||
if(typeof e == "string")
|
||||
{
|
||||
console.error(timeStr + e);
|
||||
}
|
||||
else if(e.stack != null)
|
||||
{
|
||||
console.error(timeStr + e.stack);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.error(timeStr + JSON.stringify(e));
|
||||
}
|
||||
}
|
||||
|
||||
function randomPadName()
|
||||
{
|
||||
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
|
||||
|
|
Loading…
Reference in a new issue