Skip to content

Commit

Permalink
rationalizing logs
Browse files Browse the repository at this point in the history
updating mapping to more constricted set of logs per
https://github.com/RackHD/RackHD/issues/34

**NOTE**: Requires RackHD/on-core#48 to be
committed prior as it adds the synonym 'critical' to the existing 'crit'
level.
  • Loading branch information
heckj committed Dec 21, 2015
1 parent 959ab31 commit 304c56b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ core.start()
).start();
})
.catch(function(e) {
logger.error("Error starting server", {
logger.critical("Error starting server", {
error: e
});
process.nextTick(function() {
Expand Down
4 changes: 2 additions & 2 deletions lib/message-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function messageHandlerFactory(
}
})
.catch(function(err) {
logger.error("Failed to get bootfile information for " + packetData.chaddr.address, {
logger.warning("Failed to get bootfile information for " + packetData.chaddr.address, {
error: err
});
});
Expand Down Expand Up @@ -310,7 +310,7 @@ function messageHandlerFactory(

if (action === 'discover') {
assert.object(this.packetData);
logger.silly(
logger.debug(
"Unknown node %s. Sending down default bootfile."
.format(this.packetData.chaddr.address)
);
Expand Down
2 changes: 1 addition & 1 deletion lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function ParserFactory(protocol, Logger, assert) {
}

if (unhandledOptions.length) {
this.logger.silly('Unhandled DHCP options (' +
this.logger.debug('Unhandled DHCP options (' +
unhandledOptions.map(function (option) {
return option.code + ':' + option.len;
}).join() + ')', {
Expand Down
4 changes: 2 additions & 2 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function serverFactory(core, messageHandler, Logger) {
if (data.isefi === true) {
currentOutport = this.outportEFI;
}
logger.info('current OutPort => %d'.format(currentOutport));
logger.debug('current OutPort => %d'.format(currentOutport));
this.server.send(packetBuffer, 0, packetBuffer.length, currentOutport,
destination, sendCallback);
};
Expand All @@ -49,7 +49,7 @@ function serverFactory(core, messageHandler, Logger) {
});

self.server.on('error', function(err) {
logger.emerg("proxyDHCP server error: ", err);
logger.critical("proxyDHCP server error: ", err);
process.nextTick(function() {
process.exit(1);
});
Expand Down

0 comments on commit 304c56b

Please sign in to comment.