From b044fa4acf9e951512ad8ae696724c918507382d Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 11 Dec 2022 11:58:49 +0100 Subject: [PATCH] s/disable_logging/logging_level/g on entity events. --- platypush/message/event/entities.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/platypush/message/event/entities.py b/platypush/message/event/entities.py index 6f82f092a..fe3342df4 100644 --- a/platypush/message/event/entities.py +++ b/platypush/message/event/entities.py @@ -1,19 +1,15 @@ -from abc import ABC +import logging from typing import Union from platypush.entities import Entity from platypush.message.event import Event -class EntityEvent(Event, ABC): - def __init__( - self, entity: Union[Entity, dict], *args, disable_logging=True, **kwargs - ): +class EntityEvent(Event): + def __init__(self, entity: Union[Entity, dict], *args, **kwargs): if isinstance(entity, Entity): entity = entity.to_json() - super().__init__( - entity=entity, *args, disable_logging=disable_logging, **kwargs - ) + super().__init__(entity=entity, *args, **kwargs) class EntityUpdateEvent(EntityEvent): @@ -22,6 +18,9 @@ class EntityUpdateEvent(EntityEvent): a sensor, a media player etc.) updates its state. """ + def __init__(self, *args, logging_level=logging.DEBUG, **kwargs): + super().__init__(*args, logging_level=logging_level, **kwargs) + class EntityDeleteEvent(EntityEvent): """