# Path: neckbeard/terminal_colors.py
# (
#     BLACK,
#     RED,
#     GREEN,
#     YELLOW,
#     BLUE,
#     MAGENTA,
#     CYAN,
#     LIGHT_GRAY,
#     DARK_GRAY,
#     BRIGHT_RED,
#     BRIGHT_GREEN,
#     BRIGHT_YELLOW,
#     BRIGHT_BLUE,
#     BRIGHT_MAGENTA,
#     BRIGHT_CYAN,
#     WHITE,
# ) = range(16)
# def rgb(red, green, blue):
# def gray(value):
# def set_color(fg=None, bg=None):
# def _set_color(fg=None, bg=None):
# def reset_color():
# def _reset_color():
# def print_color(*args, **kwargs):
# def format_color(string, fg=None, bg=None):


import logging
import boto
from neckbeard.terminal_colors import format_color, BLUE, GREEN, DARK_GRAY, RED

LOGGERS = [
    'cli',
    'configuration',
    'loader',
    'environment_manager',
    'actions.view',
    'actions.up',
    'timer',
]


class ColoredFormatter(logging.Formatter):
    def format(self, record):
        levelname = record.levelname
        color = LEVEL_COLORS.get(levelname)
        if color is not None:
            record.levelname = format_color(levelname, color)
        return logging.Formatter.format(self, record)

colored_formatter = ColoredFormatter(
    "%(asctime)s%(levelname)s:%(name)s:%(message)s", "%M:%S"
)


class TimingFormatter(logging.Formatter):
    """
    Make the name part gray.
    """
    def format(self, record):

# Path: neckbeard/terminal_colors.py
# (
#     BLACK,
#     RED,
#     GREEN,
#     YELLOW,
#     BLUE,
#     MAGENTA,
#     CYAN,
#     LIGHT_GRAY,
#     DARK_GRAY,
#     BRIGHT_RED,
#     BRIGHT_GREEN,
#     BRIGHT_YELLOW,
#     BRIGHT_BLUE,
#     BRIGHT_MAGENTA,
#     BRIGHT_CYAN,
#     WHITE,
# ) = range(16)
# def rgb(red, green, blue):
# def gray(value):
# def set_color(fg=None, bg=None):
# def _set_color(fg=None, bg=None):
# def reset_color():
# def _reset_color():
# def print_color(*args, **kwargs):
# def format_color(string, fg=None, bg=None):


# Path: neckbeard/output.py
import logging
import boto
from neckbeard.terminal_colors import format_color, BLUE, GREEN, DARK_GRAY, RED


LOGGERS = [
    'cli',
    'configuration',
    'loader',
    'environment_manager',
    'actions.view',
    'actions.up',
    'timer',
]


class ColoredFormatter(logging.Formatter):
    def format(self, record):
        levelname = record.levelname
        color = LEVEL_COLORS.get(levelname)
        if color is not None:
            record.levelname = format_color(levelname, color)
        return logging.Formatter.format(self, record)

colored_formatter = ColoredFormatter(
    "%(asctime)s%(levelname)s:%(name)s:%(message)s", "%M:%S"
)


class TimingFormatter(logging.Formatter):
    """
    Make the name part gray.
    """
    def format(self, record):

        record.name = format_color(record.name, DARK_GRAY)