mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
Removed unneeded console.log and extraneous variable declarations.
This commit is contained in:
parent
d35c891a1b
commit
dc7bda44f0
@ -19,29 +19,26 @@ var colours = {
|
||||
|
||||
function hipchatAppender(_config, _layout) {
|
||||
|
||||
config = _config;
|
||||
layout = _layout || layouts.basicLayout;
|
||||
|
||||
return function (loggingEvent) {
|
||||
|
||||
var data = {
|
||||
room_id: config.room_id,
|
||||
from: config.from,
|
||||
room_id: _config.room_id,
|
||||
from: _config.from,
|
||||
message: layout(loggingEvent, config.timezoneOffset),
|
||||
format: config.format,
|
||||
format: _config.format,
|
||||
color: colours[loggingEvent.level.toString()],
|
||||
notify: config.notify
|
||||
notify: _config.notify
|
||||
};
|
||||
|
||||
hipchat.api.rooms.message(data, function (err, res) {
|
||||
if (err) { throw err; }
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function configure(_config) {
|
||||
config = _config;
|
||||
|
||||
if (_config.layout) {
|
||||
layout = layouts.layout(_config.layout.type, _config.layout);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user