diff --git a/node/server.js b/node/server.js index 56f58d945..9020f54b0 100644 --- a/node/server.js +++ b/node/server.js @@ -60,6 +60,9 @@ var serverName = "Etherpad-Lite " + version + " (http://j.mp/ep-lite)"; //cache 6 hours exports.maxAge = 1000*60*60*6; +//set loglevel +log4js.setGlobalLogLevel(settings.loglevel); + async.waterfall([ //initalize the database function (callback) diff --git a/node/utils/Settings.js b/node/utils/Settings.js index b6af57657..692074abe 100644 --- a/node/utils/Settings.js +++ b/node/utils/Settings.js @@ -52,6 +52,11 @@ exports.minify = true; */ exports.abiword = null; +/** + * The log level of log4js + */ +exports.loglevel = "INFO"; + //read the settings sync var settingsStr = fs.readFileSync("../settings.json").toString(); diff --git a/settings.json.template b/settings.json.template index 47663c8f3..a7afaecc9 100644 --- a/settings.json.template +++ b/settings.json.template @@ -34,5 +34,8 @@ /* This is the path to the Abiword executable. Setting it to null, disables abiword. Abiword is needed to enable the import/export of pads*/ - "abiword" : null + "abiword" : null, + + /* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */ + "loglevel": "INFO" }