cluedin.nodejs.common
v0.0.3
Published
## Logging
Downloads
2
Readme
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