mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 18:06:15 -04:00
Merge pull request #1353 from ether/feature/log4js-config-setting
Add log4js config setting
This commit is contained in:
commit
6104987a4b
6 changed files with 21 additions and 8 deletions
|
@ -25,7 +25,6 @@ var log4js = require('log4js')
|
|||
, async = require('async')
|
||||
;
|
||||
|
||||
// set up logger
|
||||
log4js.replaceConsole();
|
||||
|
||||
var settings
|
||||
|
@ -50,8 +49,6 @@ async.waterfall([
|
|||
hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
|
||||
hooks.plugins = plugins;
|
||||
|
||||
//set loglevel
|
||||
log4js.setGlobalLogLevel(settings.loglevel);
|
||||
callback();
|
||||
},
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ var path = require('path');
|
|||
var argv = require('./Cli').argv;
|
||||
var npm = require("npm/lib/npm.js");
|
||||
var vm = require('vm');
|
||||
var log4js = require("log4js");
|
||||
|
||||
/* Root path of the installation */
|
||||
exports.root = path.normalize(path.join(npm.dir, ".."));
|
||||
|
@ -106,6 +107,11 @@ exports.abiword = null;
|
|||
*/
|
||||
exports.loglevel = "INFO";
|
||||
|
||||
/*
|
||||
* log4js appender configuration
|
||||
*/
|
||||
exports.logconfig = { appenders: [{ type: "console" }]};
|
||||
|
||||
/* This setting is used if you need authentication and/or
|
||||
* authorization. Note: /admin always requires authentication, and
|
||||
* either authorization by a module, or a user with is_admin set */
|
||||
|
@ -173,6 +179,10 @@ exports.reloadSettings = function reloadSettings() {
|
|||
console.warn("Unknown Setting: '" + i + "'. This setting doesn't exist or it was removed");
|
||||
}
|
||||
}
|
||||
|
||||
log4js.configure(exports.logconfig);//Configure the logging appenders
|
||||
log4js.setGlobalLogLevel(exports.loglevel);//set loglevel
|
||||
log4js.replaceConsole();
|
||||
|
||||
if(exports.dbType === "dirty"){
|
||||
console.warn("DirtyDB is used. This is fine for testing but not recommended for production.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue