logr-slack

    3.0.1 • Public • Published

    logr-slack

    Test Status Lint Status

    For use exclusively with logr-all and logr

    Installation

    npm install logr-slack

    or

    yarn add logr-slack

    Usage

    const Logr = require('logr');
    
    Logr.createLogger({
      initLog: true,
      reporters: {
        slack: {
          reporter: require('logr-slack'),
          options: {
            enabled: process.env.SLACK_HOOK ? true : false,
            slackHook: process.env.SLACK_HOOK,
            channel: process.env.SLACK_CHANNEL,
            username: process.env.SLACK_USERNAME ? process.env.SLACK_USERNAME : 'logr',
            filter: process.env.LOGR_SLACK_FILTER ? process.env.LOGR_SLACK_FILTER.split(',') : ['error']
          }
        },
      }
    });

    A First + Third Project

    Keywords

    Install

    npm i logr-slack

    DownloadsWeekly Downloads

    30

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    10.5 kB

    Total Files

    11

    Last publish

    Collaborators

    • jga
    • dawnerd
    • orthagonal1