How to use the log4js.shutdown function in log4js

To help you get started, we’ve selected a few log4js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flow-typed / flow-typed / definitions / npm / log4js_v1.x.x / flow_v0.25.x- / test_log4js.js View on Github external
// $ExpectError
log4js.configure({
  appenders: [{}],
});

log4js.getLogger().log('test');
log4js.getLogger('test').error('test', 'test');

// $ExpectError
log4js.getLogger('test').test('test');

// $ExpectError
log4js.getLogger(1);

log4js.shutdown(() => {});

// $ExpectError
log4js.shutdown();

log4js.connectLogger(log4js.getLogger(), {});

const error = log4js.levels.ERROR;
github facebookarchive / atom-ide-ui / modules / big-dig / src / server / launchServer.js View on Github external
process.on('unhandledRejection', error => {
  log4js.getLogger().fatal('Unhandled rejection:', error);
  log4js.shutdown(() => process.exit(1));
});
github facebookarchive / atom-ide-ui / big-dig-samples / command-line-client / logging.js View on Github external
process.on('unhandledRejection', error => {
    log4js.getLogger().fatal('Unhandled rejection:', error);
    log4js.shutdown(() => process.exit(1));
  });
github eclipse / orion.client / modules / orionode / lib / util / serverUtil.js View on Github external
function done() {
			if (_shutdownTimer) clearTimeout(_shutdownTimer);
			logger.info("Exiting after all tasks ended, pid: " + process.pid + " code: " + (code || 0) + " (code=1 means hard)");
			log4js.shutdown(function() {
				process.exit(code || 0);
			});
		}
		var data = {
github hubrixco / logjack / jackLogger.js View on Github external
shutdown(){
        log4js.shutdown(this.postShutdown());
    }
    postShutdown(){
github mi-g / vdhcoapp / app / logger.js View on Github external
logger.shutdown = (callback) => {
	log4js.shutdown(callback);
}
github facebookarchive / flow-language-server / server / src / pkg / nuclide-logging / lib / main.js View on Github external
export function flushLogsAndAbort(): void {
  log4js.shutdown(() => process.abort());
}
github nodeca / nodeca.core / lib / system / runner / initialize.js View on Github external
N.logger.shutdown = function (cb) {
    log4js.shutdown(cb);
  };
github apache / openwhisk / core / nodejsActionBase / src / logger.js View on Github external
thelogger.shutdown = function(cb) {
        log4js.shutdown(cb);
    }
    return thelogger;
github facebookarchive / atom-ide-ui / modules / nuclide-commons-atom / run-package.js View on Github external
process.on('uncaughtException', err => {
  logger.fatal('Uncaught exception:', err);
  log4js.shutdown(() => process.abort());
});