scripts: improve linking logs

This commit is contained in:
Julian Bouzas
2024-03-07 10:37:34 -05:00
committed by George Kiagiadakis
parent 88f893e2ce
commit bed3b62e0d
2 changed files with 4 additions and 2 deletions

View File

@@ -53,10 +53,12 @@ SimpleEventHook {
local filter_target = futils.get_filter_from_target (target_direction, target)
if filter_target ~= nil then
target = filter_target
log:info (si, "... got filter for given target")
elseif filter_target == nil and not si_flags.has_defined_target then
filter_target = futils.get_filter_from_target (target_direction, nil)
if filter_target ~= nil then
target = filter_target
log:info (si, "... got default filter for given target")
end
end
@@ -71,7 +73,7 @@ SimpleEventHook {
if target_picked then
log:info (si,
string.format ("... filter target picked: %s (%s), can_passthrough:%s",
string.format ("... target picked: %s (%s), can_passthrough:%s",
tostring (target.properties ["node.name"]),
tostring (target.properties ["node.id"]),
tostring (can_passthrough)))

View File

@@ -35,7 +35,7 @@ SimpleEventHook {
-- Check if item is linked to proper target, otherwise re-link
if si_flags.peer_id then
if target and si_flags.peer_id == target.id then
log:debug (si, "... already linked to proper target")
log:info (si, "... already linked to proper target")
-- Check this also here, in case in default targets changed
if Settings.get_boolean ("linking.follow-default-target") and