Skip to content

Commit 034f378

Browse files
muelliCropi
authored andcommitted
Added some more logging
1 parent e0e5936 commit 034f378

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/DBus/DBusBridge.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ namespace usbguard
162162
void DBusBridge::handleDevicesMethodCall(const std::string& method_name, GVariant* parameters,
163163
GDBusMethodInvocation* invocation)
164164
{
165+
USBGUARD_LOG(Debug) << "dbus devices method call: " << method_name;
165166
if (method_name == "listDevices") {
166167
const char* query_cstr = nullptr;
167168
g_variant_get(parameters, "(&s)", &query_cstr);
@@ -199,6 +200,7 @@ namespace usbguard
199200
uint32_t target_integer = 0;
200201
gboolean permanent = false;
201202
g_variant_get(parameters, "(uub)", &device_id, &target_integer, &permanent);
203+
USBGUARD_LOG(Debug) << "DBus: applyDevicePolicy: Parsed device_id: " << device_id << " target_integer: " << target_integer << " and permanent: " << permanent;
202204
const Rule::Target target = Rule::targetFromInteger(target_integer);
203205
const uint32_t rule_id = applyDevicePolicy(device_id, target, permanent);
204206
g_dbus_method_invocation_return_value(invocation, g_variant_new("(u)", rule_id));

src/Library/DeviceManagerPrivate.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ namespace usbguard
117117
return _device_map.at(id);
118118
}
119119
catch (...) {
120+
USBGUARD_LOG(Debug) << "Lookup error: " << id;
120121
throw Exception("Device lookup", "device id", "id doesn't exist");
121122
}
122123
}

src/Library/public/usbguard/RuleSet.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ namespace usbguard
7272
uint32_t RuleSet::appendRule(const Rule& rule, uint32_t parent_id, bool lock)
7373
{
7474
std::unique_lock<std::mutex> op_lock(_op_mutex, std::defer_lock);
75+
USBGUARD_LOG(Debug) << "appendRule parent:" << parent_id;
7576

7677
if (lock) {
7778
op_lock.lock();

0 commit comments

Comments
 (0)