README
slf4ts-console
Console Logging-Binding for slf4ts
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>