@gabliam/log4js
v9.0.0
Published
log4js plugin for gabliam
Downloads
18
Readme
Gabliam log4js
Gabliam plugin for add log4js.
Install
$ npm install @gabliam/log4js
How to use
Add plugin
import { Gabliam } from '@gabliam/core';
const gab = new Gabliam({
scanPath: p,
configPath: p
});
gab.addPlugin(Log4jsPlugin);
gab.buildAndStart();
In class
import { Service } from '@gabliam/core';
import { log4js } from '@gabliam/log4js';
@Service()
export class SampleService {
public logger = log4js.getLogger(TestLog.name);
test() {
this.logger.info('Info');
this.logger.debug('debug');
this.logger.error('error');
this.logger.fatal('fatal');
this.logger.warn('warn');
}
}
License
MIT