diff --git a/legacy/legacy.js b/legacy/legacy.js index 87fc5b7..ff3a6b1 100644 --- a/legacy/legacy.js +++ b/legacy/legacy.js @@ -2,14 +2,15 @@ var envFactory = require('..'); -module.exports = function () { +module.exports = function (logger) { + logger = logger || console; var env = envFactory(); env.on(env.EVENT_FOUND, function (fullKeyName, value) { - console.log('[env] %s was defined, using: %s', fullKeyName, String(value)); + logger.info('[env] %s was defined, using: %s', fullKeyName, String(value)); }) .on(env.EVENT_FALLBACK, function (fullKeyName, $default) { - console.log('[env] %s was not defined, using default: %s', fullKeyName, String($default)); + logger.info('[env] %s was not defined, using default: %s', fullKeyName, String($default)); }); return env;