From c7970842d7b3ecf2e0890921988bf3ddfadd7199 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 30 Apr 2022 02:13:20 +0200 Subject: [PATCH] Disable logging by default for entity events (they can be quite spammy) --- platypush/message/event/entities.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platypush/message/event/entities.py b/platypush/message/event/entities.py index 4c475c588..6f82f092a 100644 --- a/platypush/message/event/entities.py +++ b/platypush/message/event/entities.py @@ -6,10 +6,14 @@ from platypush.message.event import Event class EntityEvent(Event, ABC): - def __init__(self, entity: Union[Entity, dict], *args, **kwargs): + def __init__( + self, entity: Union[Entity, dict], *args, disable_logging=True, **kwargs + ): if isinstance(entity, Entity): entity = entity.to_json() - super().__init__(entity=entity, *args, **kwargs) + super().__init__( + entity=entity, *args, disable_logging=disable_logging, **kwargs + ) class EntityUpdateEvent(EntityEvent):