forked from platypush/platypush
Disable logging by default for entity events (they can be quite spammy)
This commit is contained in:
parent
7df67aca82
commit
c7970842d7
1 changed files with 6 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue