Fixed log removal

This commit is contained in:
Adolfo Gómez García 2021-09-02 13:27:27 +02:00
parent c30a67d363
commit 23afd01004

View File

@ -29,13 +29,12 @@
"""
@author: Adolfo Gómez, dkmaster at dkmon dot com
"""
import traceback
import logging
import typing
from uds import models
from uds.core.util import log
from uds.core.util.config import GlobalConfig
# Not imported at runtime, just for type checking
@ -201,9 +200,11 @@ class LogManager:
"""
owner_type = transDict.get(type(wichObject), None)
if owner_type:
if owner_type is not None:
self.__clearLogs(owner_type, wichObject.id) # type: ignore
else:
logger.debug(
'Requested clearLogs for a type of object not covered: %s', wichObject
'Requested clearLogs for a type of object not covered: %s: %s', type(wichObject), wichObject
)
for line in traceback.format_stack(limit=5):
logger.debug('>> %s', line)