Source code for cellsystem.logging.core.weak
from .log import Log
[docs]class WeakLog(Log):
'Ignore silently calls to not implemented log methods.'
[docs] def preparefor(self, action, *args, **kwargs):
try:
logaction = getattr(self, 'preparefor_'+action)
except AttributeError:
return
else:
logaction(*args, **kwargs)
[docs] def log(self, action, *args, **kwargs):
try:
logaction = getattr(self, 'log_'+action)
except AttributeError:
return
else:
logaction(*args, **kwargs)