0.0.3 • Published 5 years ago

cluedin.nodejs.common v0.0.3

Weekly downloads
10
License
ISC
Repository
github
Last release
5 years ago

CluedIn.Node.Common

Logging

To use the logging common, import it and instantiate it.

The LoggerProvider must, at least, have a name

const { LogProvider } = require('cluedin-nodejs-common');

const logger = new LogProvider({
  name: 'my-project-name',
});

logger.info('yeah');

Extending the streams

If you want to add streams to the default want, just pass an array of the streams you want.

const { LogProvider } = require('cluedin-nodejs-common');

const logger = new LogProvider({
  name: 'my-project-name-with-extra-stream',
  steams: [
    {
      stream: MyCustomStream,
      level: "info",
      name: "my custom stream",
    }
  ]
});

logger.info('yeah');

Env variables

SeqURL

If you want to use Seq for debugging purpose, just provide a SEQ url.

SeqLoggingLevel

logging level ('info', 'warn'....)

ConsoleLoggingLevel

logging level for the console