loglevel-test-francisco
v0.0.0
Published
## Installation
Downloads
4
Maintainers
Readme
loglevel Railtownai Plugin
Installation
npm i @railtownai/loglevel-railtownai
Configuration
logger
-object
- loglevel instance to be extendedoptions
-object
- used to add your railtown token
Example
const loglevelRailtown = require('@railtownai/loglevel-railtownai');
loglevelRailtown(logger, {
token: 'your_token_here',
});
//or use environment variable 'RAILTOWN_TOKEN' and call it without the token key
loglevelRailtown(logger);
Manually Logging Errors with additional properties
Import loglevelLogger and use as follows:
try {
// code to try
} catch (error) {
const logError = {
err: error,
userId: '123456789',
projectId:'abcdefg'
};
loglevelLogger.error(logError);
}
This will send log messages to railtownai.