From 844bcd75080d3b69e2021bc920e884ef6b907d74 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 14 Aug 2023 18:41:51 +0200 Subject: [PATCH] parent_affecting_logging: a zone affects everything in it --- lib/base/configobject.ti | 2 +- lib/remote/endpoint.cpp | 6 ++++++ lib/remote/endpoint.hpp | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/base/configobject.ti b/lib/base/configobject.ti index ea67dfa7b..177a6f3c0 100644 --- a/lib/base/configobject.ti +++ b/lib/base/configobject.ti @@ -66,7 +66,7 @@ abstract class ConfigObject : ConfigObjectBase < ConfigType return shortName; }}} }; - [config, no_user_modify] name(Zone) zone (ZoneName); + [config, no_user_modify, parent_affecting_logging] name(Zone) zone (ZoneName); [config, no_user_modify] String package; [config, get_protected, no_user_modify] Array::Ptr templates; [config, no_storage, no_user_modify] Dictionary::Ptr source_location { diff --git a/lib/remote/endpoint.cpp b/lib/remote/endpoint.cpp index e534fc178..714606cca 100644 --- a/lib/remote/endpoint.cpp +++ b/lib/remote/endpoint.cpp @@ -26,6 +26,12 @@ void Endpoint::OnAllConfigLoaded() "' does not belong to a zone.", GetDebugInfo())); } +void Endpoint::GetParentsAffectingLogging(std::vector& output) const +{ + ObjectImpl::GetParentsAffectingLogging(output); + output.emplace_back(GetZone()); +} + void Endpoint::SetCachedZone(const Zone::Ptr& zone) { if (m_Zone) diff --git a/lib/remote/endpoint.hpp b/lib/remote/endpoint.hpp index d641c2c6b..2e121d2fb 100644 --- a/lib/remote/endpoint.hpp +++ b/lib/remote/endpoint.hpp @@ -51,6 +51,7 @@ public: protected: void OnAllConfigLoaded() override; + void GetParentsAffectingLogging(std::vector& output) const override; private: mutable std::mutex m_ClientsLock;