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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-09 01:09:17 +00:00
|
|
|
class InterpositionException(Exception):
|
|
|
|
|
"""Base exception class."""
|
|
|
|
|
pass
|
2013-03-04 05:43:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-09 01:09:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class Logger(object):
|
|
|
|
|
"""A static logging object for tuf.interposition."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__logger = logging.getLogger("tuf.interposition")
|
|
|
|
|
|
|
|
|
|
|
2013-08-12 21:29:57 +00:00
|
|
|
@staticmethod
|
|
|
|
|
def debug(message):
|
|
|
|
|
Logger.__logger.debug(message)
|
|
|
|
|
|
|
|
|
|
|
2013-03-09 01:09:17 +00:00
|
|
|
@staticmethod
|
2013-03-15 00:42:31 +00:00
|
|
|
def exception(message):
|
|
|
|
|
Logger.__logger.exception(message)
|
2013-03-09 01:09:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
2013-03-15 00:42:31 +00:00
|
|
|
def info(message):
|
|
|
|
|
Logger.__logger.info(message)
|
2013-03-09 01:09:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def warn(message):
|
2013-03-14 21:13:21 +00:00
|
|
|
Logger.__logger.warn(message)
|