slf4ts-console

Console logging-binding for slf4ts-api

Usage no npm install needed!

<script type="module">
  import slf4tsConsole from 'https://cdn.skypack.dev/slf4ts-console';
</script>

README

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