Skip to content

Commit

Permalink
fix(legacy)
Browse files Browse the repository at this point in the history
  • Loading branch information
FGRibreau committed May 19, 2015
1 parent 67fceaf commit 72a4104
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions legacy/legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 72a4104

Please sign in to comment.