python-tuf/tuf/interposition/utility.py

44 lines
606 B
Python
Raw Normal View History

2013-03-04 05:43:02 +00:00
import logging
2013-03-15 00:42:31 +00:00
# Import our standard logger for its side effects.
import tuf.log
2013-03-04 05:43:02 +00:00
class InterpositionException(Exception):
"""Base exception class."""
pass
2013-03-04 05:43:02 +00:00
class Logger(object):
"""A static logging object for tuf.interposition."""
__logger = logging.getLogger("tuf.interposition")
@staticmethod
def debug(message):
Logger.__logger.debug(message)
@staticmethod
2013-03-15 00:42:31 +00:00
def exception(message):
Logger.__logger.exception(message)
@staticmethod
2013-03-15 00:42:31 +00:00
def info(message):
Logger.__logger.info(message)
@staticmethod
def warn(message):
2013-03-14 21:13:21 +00:00
Logger.__logger.warn(message)