loglevel-test-francisco
TypeScript icon, indicating that this package has built-in type declarations

0.0.0 • Public • Published

loglevel Railtownai Plugin

Installation

npm i @railtownai/loglevel-railtownai

Configuration

  • logger - object - loglevel instance to be extended
  • options - 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.

Package Sidebar

Install

npm i loglevel-test-francisco

Weekly Downloads

1

Version

0.0.0

License

MIT

Unpacked Size

9.19 kB

Total Files

6

Last publish

Collaborators

  • francisco-matamoros