From b6497b0e8647e6a2a0db778174e3fb76c27c368d Mon Sep 17 00:00:00 2001 From: vladimir Date: Wed, 15 Mar 2017 20:44:12 +0200 Subject: [PATCH] Fix logging for ldap module --- lib/passport.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/passport.js b/lib/passport.js index 0a5a0f12..60bbbe3d 100644 --- a/lib/passport.js +++ b/lib/passport.js @@ -16,8 +16,9 @@ let LdapStrategy; try { LdapStrategy = require('passport-ldapjs').Strategy; // eslint-disable-line global-require } catch (E) { - // ignore - console.warn('Module "passport-ldapjs" not installed. LDAP auth will fail.'); + if (config.ldap.enabled) { + log.info('LDAP', 'Module "passport-ldapjs" not installed. LDAP auth will fail.'); + } } module.exports.csrfProtection = csrf({