Skip to content

Commit 0f07156

Browse files
committed
Removed logger from config
1 parent 0926345 commit 0f07156

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,11 @@ module.exports.log = log;
2626
* hydrater_function, the actual function to use for hydration. This function takes as params the path to the file on the disk, the current data about the document and a callback to use after hydration. First param is the path to the file, second param the document (metadata, binary_document_type). Third param is the callback, send as first argument an error if any, then the new document data.
2727
* Optional:
2828
* concurrency, max number of simultaneous calls to your hydrater function (default is 1)
29-
* logger, function to use for logging. Defaults to console.log
3029
*/
3130
module.exports.createServer = function(config) {
3231
if(!config.hydrater_function) {
3332
throw new Error("Specify `hydrater_function`");
3433
}
35-
config.logger = config.logger || console.log;
36-
config.errLogger = config.errLogger || console.error;
3734

3835
utils.logError.config = config;
3936

lib/utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ module.exports.logError = function logError(err, req, extra) {
2727
if(module.exports.logError.config) {
2828
extra.hydrater = module.exports.logError.config.hydraterUrl;
2929
}
30+
if(process.env.APP_NAME) {
31+
extra.hydrater_name = process.env.APP_NAME;
32+
}
3033

3134
if(module.exports.logError.opbeat) {
3235
var meta = {

0 commit comments

Comments
 (0)