* Added session_log events to text_log

* user error severity instead of debug for failure

* updated test expectation

* added user_id to logout message

* empty commit

---------

Co-authored-by: Alexey Gerasimchuck <a.gerasimchuck@arenadata.io>
This commit is contained in:
Alexander Tokmakov 2023-08-15 00:41:24 +03:00 committed by GitHub
parent 5ab82cc019
commit 1e3f9c8cfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,6 +299,7 @@ Session::~Session()
if (notified_session_log_about_login)
{
LOG_DEBUG(log, "{} Logout, user_id: {}", toString(auth_id), toString(*user_id));
if (auto session_log = getSessionLog())
{
/// TODO: We have to ensure that the same info is added to the session log on a LoginSuccess event and on the corresponding Logout event.
@ -320,6 +321,7 @@ AuthenticationType Session::getAuthenticationTypeOrLogInFailure(const String & u
}
catch (const Exception & e)
{
LOG_ERROR(log, "{} Authentication failed with error: {}", toString(auth_id), e.what());
if (auto session_log = getSessionLog())
session_log->addLoginFailure(auth_id, getClientInfo(), user_name, e);