<gh_stars>0
# -*- coding: utf-8 -*-
"""
Module containing decorator for debugging and logging exceptions

"""

__author__ = '<NAME>'
__email__ = '<EMAIL>'

from .tracking import Tracking
from .logging import LOGGER


class Debugger(Tracking):
    """
    Debugging decorator

    """

    def __call__(self, *args, **kwargs):
        """
        private call method

        """
        try:
            function = self.func(*args, **kwargs)
            return function
        except Exception as debugger_exception:
            if self.func.__name__ == "__init__":
                msg = "[{}] -> '{}'".format(self.type.__name__, debugger_exception)
            else:
                msg = "[{}.{}] -> '{}'".format(self.type.__name__,
                                               self.func.__name__, debugger_exception)
            LOGGER.debug(msg)

# -*- coding: utf-8 -*-
"""
Module containing decorator for debugging and logging exceptions

"""

__author__ = '<NAME>'
__email__ = '<EMAIL>'

from .tracking import Tracking
from .logging import LOGGER


class Debugger(Tracking):
    """
    Debugging decorator

    """

    def __call__(self, *args, **kwargs):
        """
        private call method

        """
        try:
            function = self.func(*args, **kwargs)
            return function
        except Exception as debugger_exception:
            if self.func.__name__ == "__init__":
                msg = "[{}] -> '{}'".format(self.type.__name__, debugger_exception)
            else:
                msg = "[{}.{}] -> '{}'".format(self.type.__name__,
                                               self.func.__name__, debugger_exception)
            LOGGER.debug(msg)
# -*- coding: utf-8 -*- Module containing decorator for debugging and logging exceptions Debugging decorator private call method