# Path: scripts/assume_role_lib/util.py
# def clamp(low, x, high):
#     return low if x < low else high if x > high else x


import sys, os, logging
import boto3 # Only here to ensure boto3 loggers are created
        import coloredlogs
from socket import gethostname as ghn
from .util import clamp
        help    = 'Be less verbose.',
    )
    argument_parser.add_argument(
        '--verbose', '-v',
        action  = 'count',
        default = 0,
        help    = 'Be more verbose.',
    )

def get_logger(args, name = _default_logger_name):
    try:
        coloredlogs.install(
            isatty = True,
            show_name = False,
            show_severity = False,
            level = logging.NOTSET,
            severity_to_style = {'DEBUG': {'color': 'blue'}},
        )
    except:
        logging.basicConfig(
            stream = sys.stdout,
            format = '%(asctime)s ' + ghn() + ' %(levelname)-8s %(message)s',
            datefmt = "%Y-%m-%d %H:%M:%S",
            level = logging.NOTSET,
        )
    _set_logging_level(args.quiet, args.verbose)
    return logging.getLogger(name)

def _set_logging_level(quiet, verbose):
    level_adj = (quiet - verbose) * 10

# Path: scripts/assume_role_lib/util.py
# def clamp(low, x, high):
#     return low if x < low else high if x > high else x


# Path: scripts/assume_role_lib/log.py
import sys, os, logging
import boto3 # Only here to ensure boto3 loggers are created
        import coloredlogs
from socket import gethostname as ghn
from .util import clamp

        help    = 'Be less verbose.',
    )
    argument_parser.add_argument(
        '--verbose', '-v',
        action  = 'count',
        default = 0,
        help    = 'Be more verbose.',
    )

def get_logger(args, name = _default_logger_name):
    try:
        coloredlogs.install(
            isatty = True,
            show_name = False,
            show_severity = False,
            level = logging.NOTSET,
            severity_to_style = {'DEBUG': {'color': 'blue'}},
        )
    except:
        logging.basicConfig(
            stream = sys.stdout,
            format = '%(asctime)s ' + ghn() + ' %(levelname)-8s %(message)s',
            datefmt = "%Y-%m-%d %H:%M:%S",
            level = logging.NOTSET,
        )
    _set_logging_level(args.quiet, args.verbose)
    return logging.getLogger(name)

def _set_logging_level(quiet, verbose):
    level_adj = (quiet - verbose) * 10

    new_level = clamp(