@gabliam/log4js
TypeScript icon, indicating that this package has built-in type declarations

9.0.0 • Public • Published

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

/@gabliam/log4js/

    Package Sidebar

    Install

    npm i @gabliam/log4js

    Weekly Downloads

    2

    Version

    9.0.0

    License

    MIT

    Unpacked Size

    6.22 kB

    Total Files

    13

    Last publish

    Collaborators

    • gabliam