Add some extra logs. 96/324496/2
authorMichal Bloch <m.bloch@samsung.com>
Mon, 19 May 2025 15:07:17 +0000 (17:07 +0200)
committerMichal Bloch <m.bloch@samsung.com>
Tue, 20 May 2025 15:46:29 +0000 (17:46 +0200)
Change-Id: Id34eb705667edd27fcbcd5c08c9bce1532d8a8a1

src/service/src/fs_helpers.cpp
src/service/src/main_context.hpp

index 636d087a45fdd34721e47fcc94be2282b953f597..c0d04d8737bb1e22a02b7ac464ca410a0c192a7b 100644 (file)
@@ -282,8 +282,10 @@ static const DirBackend& GetBackendOfSubsession(const fs::path& path)
 
 bool switch_user_subsession(const int session_uid, const std::string_view prev_subsession, const std::string_view next_subsession)
 {
-       if (prev_subsession == next_subsession)
+       if (prev_subsession == next_subsession) {
+               LOGD("Switch to '%s' not needed, already current", prev_subsession.data());
                return true;
+       }
 
        /* We switch into next first, and only then switch away from prev. This is so
         * that we are never in an intermediate "no session" state which is important
@@ -354,6 +356,7 @@ std::vector<std::string> get_user_list(const int session_uid) try
 
        return subsessions;
 } catch (std::runtime_error &ex) {
+       LOGE("Runtime exception while enumerating user subsessions [session_uid=%d]: %s", session_uid, ex.what());
        return {};
 } catch (std::exception const &ex) {
        LOGE("Exception while enumerating user subsessions [session_uid=%d]: %s", session_uid, ex.what());
index 6836d18956a39fa49075704df0598ac7ae825c6e..9fc05648f597b524d5646ed33fc0dd80d58719ae 100644 (file)
@@ -520,6 +520,7 @@ struct sessiond_context {
                        throw std::runtime_error(std::string("Unknown method ") + method_name + " called");
                LOGD("Handling %s call from %s", method_name, sender);
                (self->*(to_call->second))(invocation, std::string_view(sender), parameters);
+               LOGD("Successfully handled %s call from %s", method_name, sender);
        } catch (const std::invalid_argument &ex) {
                g_dbus_method_invocation_return_dbus_error(invocation,
                        get_dbus_error_mapping(SUBSESSION_ERROR_INVALID_PARAMETER), ex.what());