Skip to content

Commit

Permalink
Updated logging in a few places
Browse files Browse the repository at this point in the history
Detecting modules loaded before the trace agent now causes an error to
be logged (up from warning). Message logged for full trace buffer now
states this as the cause.

Fixes #194
  • Loading branch information
Matt Loring committed Dec 28, 2015
1 parent 2c493b3 commit a11676d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/hooks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function activate(agent) {
var regex = new RegExp('node_modules' + path.sep + moduleName + path.sep);
for (var file in require.cache) {
if (file.match(regex)) {
logger.warn(moduleName + ' tracing might not work as ' + file +
logger.error(moduleName + ' tracing might not work as ' + file +
' was loaded before the trace agent was initialized.');
break;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/trace-writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ TraceWriter.prototype.queueTrace_ = function(trace) {

// Publish soon if the buffer is getting big
if (that.buffer_.length >= that.config_.bufferSize) {
that.logger_.info('Flushing: performing periodic flush');
that.logger_.info('Flushing: trace buffer full');
setImmediate(function() { that.flushBuffer_(project); });
}
});
Expand Down

0 comments on commit a11676d

Please sign in to comment.