Skip to content

Commit e21a4b1

Browse files
committed
fix server logs for non-json logs
1 parent f194c81 commit e21a4b1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/server.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,9 @@ exports.Server = function Server(bsClient, workers, config, callback) {
352352
var query = null;
353353
try {
354354
query = CircularJSON.parse(body);
355-
} catch (e) {}
355+
} catch (e) {
356+
query = body;
357+
}
356358

357359
logger.trace('[%s] _log', ((uuid && workers[uuid]) || {}).id, query);
358360

@@ -406,3 +408,5 @@ exports.Server = function Server(bsClient, workers, config, callback) {
406408
});
407409
});
408410
};
411+
412+
exports.logger = logger;

0 commit comments

Comments
 (0)