parent_affecting_logging: a zone affects everything in it

This commit is contained in:
Alexander A. Klimov 2023-08-14 18:41:51 +02:00
parent fff2cd8089
commit 844bcd7508
3 changed files with 8 additions and 1 deletions

View File

@ -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 {

View File

@ -26,6 +26,12 @@ void Endpoint::OnAllConfigLoaded()
"' does not belong to a zone.", GetDebugInfo()));
}
void Endpoint::GetParentsAffectingLogging(std::vector<ConfigObject::Ptr>& output) const
{
ObjectImpl<Endpoint>::GetParentsAffectingLogging(output);
output.emplace_back(GetZone());
}
void Endpoint::SetCachedZone(const Zone::Ptr& zone)
{
if (m_Zone)

View File

@ -51,6 +51,7 @@ public:
protected:
void OnAllConfigLoaded() override;
void GetParentsAffectingLogging(std::vector<ConfigObject::Ptr>& output) const override;
private:
mutable std::mutex m_ClientsLock;