Source code for worldline.acquiring.sdk.log.logging_capable

from abc import ABC, abstractmethod

from .communicator_logger import CommunicatorLogger


[docs] class LoggingCapable(ABC): """ Classes that extend this class have support for log messages from communicators. """
[docs] @abstractmethod def enable_logging(self, communicator_logger: CommunicatorLogger) -> None: """ Turns on logging using the given communicator logger. :raise ValueError: If the given communicator logger is None. """ raise NotImplementedError
[docs] @abstractmethod def disable_logging(self) -> None: """ Turns off logging. """ raise NotImplementedError