mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
update hipchat-appender example
This commit is contained in:
parent
4ab05a5cc9
commit
6131934f54
@ -1,18 +1,20 @@
|
||||
//Note that hipchat appender needs hipchat-client to work.
|
||||
//If you haven't got hipchat-client installed, you'll get cryptic
|
||||
//"cannot find module" errors when using the hipchat appender
|
||||
|
||||
/**
|
||||
* !!! The hipchat-appender requires `hipchat-notifier` from npm
|
||||
* - e.g. list as a dependency in your application's package.json
|
||||
*/
|
||||
|
||||
var log4js = require('../lib/log4js');
|
||||
|
||||
log4js.configure({
|
||||
"appenders": [
|
||||
{
|
||||
"type" : "hipchat",
|
||||
"api_key": 'Hipchat_API_V1_Key',
|
||||
"room_id": "Room_ID",
|
||||
"from": "Tester",
|
||||
"format": "text",
|
||||
"notify": "NOTIFY",
|
||||
"category" : "hipchat"
|
||||
"hipchat_token": "< User token with Notification Privileges >",
|
||||
"hipchat_room": "< Room ID or Name >",
|
||||
// optionl
|
||||
"hipchat_from": "[ additional from label ]",
|
||||
"hipchat_notify": "[ notify boolean to bug people ]"
|
||||
}
|
||||
]
|
||||
});
|
||||
@ -25,4 +27,4 @@ logger.trace("Test Trace Message");//so debug and trace are the same color: purp
|
||||
logger.fatal("Test Fatal Message");//hipchat client has limited color scheme
|
||||
logger.error("Test Error Message");// fatal and error are same color: red
|
||||
logger.all("Test All message");//grey
|
||||
//logger.debug("Test log message");
|
||||
//logger.debug("Test log message");
|
||||
|
||||
@ -8,6 +8,7 @@ exports.configure = hipchatConfigure;
|
||||
|
||||
/**
|
||||
@invoke as
|
||||
|
||||
log4js.configure({
|
||||
"appenders": [
|
||||
{
|
||||
@ -21,6 +22,10 @@ exports.configure = hipchatConfigure;
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
var logger = log4js.getLogger("hipchat");
|
||||
logger.warn("Test Warn message");
|
||||
|
||||
@invoke
|
||||
*/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user