@gabliam/log4js

log4js plugin for gabliam

Stats

StarsIssuesVersionUpdatedCreatedSize
@gabliam/log4js
408.11.06 months ago4 years agoMinified + gzip package size for @gabliam/log4js in KB

Readme

Build Status NPM version

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.