diff --git a/config.template.yml b/config.template.yml index bef6d108..5b209758 100644 --- a/config.template.yml +++ b/config.template.yml @@ -1,4 +1,6 @@ +debug_level: info + ldap: url: ldap://ldap base_dn: ou=users,dc=example,dc=com diff --git a/src/index.js b/src/index.js index 4e9a1038..ddc2d9a7 100644 --- a/src/index.js +++ b/src/index.js @@ -18,6 +18,7 @@ var config = { session_secret: yaml_config.session.secret, session_max_age: yaml_config.session.expiration || 3600000, // in ms store_directory: yaml_config.store_directory, + debug_level: yaml_config.debug_level, gmail: { user: yaml_config.notifier.gmail.username, pass: yaml_config.notifier.gmail.password diff --git a/src/lib/server.js b/src/lib/server.js index fe2394fc..e3d9f40c 100644 --- a/src/lib/server.js +++ b/src/lib/server.js @@ -44,7 +44,7 @@ function run(config, ldap_client, u2f, fn) { app.set('views', view_directory); app.set('view engine', 'ejs'); - winston.level = 'debug'; + winston.level = config.debug_level || 'info'; app.set('logger', winston); app.set('ldap client', ldap_client);