Skip to content

Latest commit

 

History

History

slf4ts-console

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

slf4ts-console

Console Logging-Binding for slf4ts

NPM Version License Dependencies Status

It's meant to be used with nodejs.

Example Usage

Example package.json:

{
    ...,
    "dependencies": {
        "slf4ts-console": "latest"
    },
    ...
}

Example code:

import { LoggerFactory } from "slf4ts-api";

const ROOT_LOGGER = LoggerFactory.getLogger();
ROOT_LOGGER.setMetadata({ application: 'my-app' });

ROOT_LOGGER.info("Test Message", { version: '1.0.0' }, new Error());

Example output:

2017-01-01T12:00:00.999Z ROOT INFO Test Message { application: 'my-app', version: '1.0.0' } Error
    at ConsoleLoggerImplementationTest.checkArgumentPassing (.../slf4ts-console/test/slf4ts/ConsoleLoggerImplementationTest.ts:XXX:XXX)
    at <anonymous>

License

MIT