Bugfixing Monolog

- Default Loglevel for logs set to 'info'
- Default config level is set to 'notice'
- using 'notice' for auth-failures
- Bugfixing wrong usage of legacy 'log()'
This commit is contained in:
Philipp Holzer 2019-01-07 20:21:58 +01:00 committed by Hypolite Petovan
parent da7706ce61
commit aa15c0e094
2 changed files with 13 additions and 11 deletions

View file

@ -148,7 +148,7 @@ class Login extends BaseModule
);
}
} catch (Exception $e) {
Logger::log('authenticate: failed login attempt: ' . Strings::escapeTags($username) . ' from IP ' . $_SERVER['REMOTE_ADDR']);
Logger::notice('authenticate: failed login attempt', ['username' => Strings::escapeTags($username), 'ip' => $_SERVER['REMOTE_ADDR']]);
info('Login failed. Please check your credentials.' . EOL);
$a->internalRedirect();
}