How to use the replaceConsole function from log4js
Find comprehensive JavaScript log4js.replaceConsole code examples handpicked from public code repositorys.
GitHub: ken9320/OnlineOffice1
55 56 57 58 59 60 61 62 63 64
const initLogging = (logLevel, config) => { // log4js.configure() modifies exports.logconfig so check for equality first. const logConfigIsDefault = deepEqual(config, defaultLogConfig()); log4js.configure(config); log4js.setGlobalLogLevel(logLevel); log4js.replaceConsole(); // Log the warning after configuring log4js to increase the chances the user will see it. if (!logConfigIsDefault) logger.warn('The logconfig setting is deprecated.'); };
0
0
1
+ 4 other calls in file
GitHub: bngo01/etherpad.testing
28 29 30 31 32 33 34 35 36 37 38 39
const settings = require('./utils/Settings'); let wtfnode; if (settings.dumpOnUncleanExit) { // wtfnode should be loaded after log4js.replaceConsole() so that it uses log4js for logging, and // it should be above everything else so that it can hook in before resources are used. wtfnode = require('wtfnode'); }
0
0
0
log4js.getLogger is the most popular function in log4js (529 examples)