Set the level of logs in the config file

pull/7/head
Clement Michaud 2017-01-22 18:18:19 +01:00
parent 804039b6aa
commit 320998ef78
3 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,6 @@
debug_level: info
ldap:
url: ldap://ldap
base_dn: ou=users,dc=example,dc=com

View File

@ -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

View File

@ -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);