# Path: dotbot/util/compat.py
# def with_metaclass(meta, *bases):
#     class metaclass(meta):
#         def __new__(cls, name, this_bases, d):
#             return meta(name, bases, d)
# 
#     return type.__new__(metaclass, "temporary_class", (), {})
# 
# Path: dotbot/messenger/color.py
# class Color(object):
#     NONE = ""
#     RESET = "\033[0m"
#     RED = "\033[91m"
#     GREEN = "\033[92m"
#     YELLOW = "\033[93m"
#     BLUE = "\033[94m"
#     MAGENTA = "\033[95m"


from ..util.singleton import Singleton
from ..util.compat import with_metaclass
from .color import Color
from .level import Level
        self._use_color = yesno

    def log(self, level, message):
        if level >= self._level:
            print("%s%s%s" % (self._color(level), message, self._reset()))

    def debug(self, message):
        self.log(Level.DEBUG, message)

    def lowinfo(self, message):
        self.log(Level.LOWINFO, message)

    def info(self, message):
        self.log(Level.INFO, message)

    def warning(self, message):
        self.log(Level.WARNING, message)

    def error(self, message):
        self.log(Level.ERROR, message)

    def _color(self, level):
        """
        Get a color (terminal escape sequence) according to a level.
        """
        if not self._use_color:
            return ""
        elif level < Level.DEBUG:
            return ""
        elif Level.DEBUG <= level < Level.LOWINFO:

# Path: dotbot/util/compat.py
# def with_metaclass(meta, *bases):
#     class metaclass(meta):
#         def __new__(cls, name, this_bases, d):
#             return meta(name, bases, d)
# 
#     return type.__new__(metaclass, "temporary_class", (), {})
# 
# Path: dotbot/messenger/color.py
# class Color(object):
#     NONE = ""
#     RESET = "\033[0m"
#     RED = "\033[91m"
#     GREEN = "\033[92m"
#     YELLOW = "\033[93m"
#     BLUE = "\033[94m"
#     MAGENTA = "\033[95m"


# Path: dotbot/messenger/messenger.py
from ..util.singleton import Singleton
from ..util.compat import with_metaclass
from .color import Color
from .level import Level

        self._use_color = yesno

    def log(self, level, message):
        if level >= self._level:
            print("%s%s%s" % (self._color(level), message, self._reset()))

    def debug(self, message):
        self.log(Level.DEBUG, message)

    def lowinfo(self, message):
        self.log(Level.LOWINFO, message)

    def info(self, message):
        self.log(Level.INFO, message)

    def warning(self, message):
        self.log(Level.WARNING, message)

    def error(self, message):
        self.log(Level.ERROR, message)

    def _color(self, level):
        """
        Get a color (terminal escape sequence) according to a level.
        """
        if not self._use_color:
            return ""
        elif level < Level.DEBUG:
            return ""
        elif Level.DEBUG <= level < Level.LOWINFO:

            return Color.YELLOW