diff --git a/config.template.yml b/config.template.yml index bef6d1089..5b2097584 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 4e9a10385..ddc2d9a75 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 fe2394fc6..e3d9f40ca 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);