0.3.0 • Published 6 years ago

bristol-hipchat v0.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

bristol-hipchat

NOTE: Atlassian has deprecated HipChat in favor of Stride. This library is no longer actively maintained accordingly. Some final formatting changes and a bugfix have been added to the most recent version, but it is no longer possible for me to test them.

A plugin formatter for Bristol that supports sending notifications to Atlassian HipChat.

Installation

npm install bristol-hipchat

Example

const Bristol = require('bristol').Bristol();
const BristolHipChat = require('bristol-hipchat');


let logger = new Bristol();

logger.addTarget(new BristolHipChat({
    token: 'xxxxxx',
    room: 23456,
    from: 'myapp',
    color: 'red',
    notify: true
})
    .withFormatter('human')
    .withLowestSeverity('error');

Options

token

Type: string required

The API key used for creating the underlying node-hipchat client. The API key used must have the notification permission to send messages. Admin keys should also work fine.

room

Type: number required

The Room ID to which a message should be sent.

from

Type: string required

The name of the "person" from whom the message will be sent.

color

Type: string Default: yellow Valid values: yellow, green, red, purple, gray, random

The color scheme of the message.

message_format

Type: string Default: html Valid values: text, html

The format of the message that will be sent.

notify

Type: boolean Default: false

A flag indicating whether or not to notify the room. Note that this setting will not override the users' notification preferences for the target room.

0.3.0

6 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago