def setup_logging(name, dir=''):
    '\n    Setup the logging device to log into a uniquely created directory.\n\n    Args:\n        name: Name of the directory for the log-files.\n        dir: Optional sub-directory within log\n    '
    global log_name
    log_name = name
    global log_dir
    log_dir = os.path.join('log', dir)
    if (not os.path.isdir(log_dir)):
        os.makedirs(log_dir)
    reload(logging)
    logging.basicConfig(level=logging.INFO, format='[%(levelname)-5.5s %(asctime)s] %(message)s', datefmt='%H:%M:%S', handlers=[logging.FileHandler(os.path.join(log_dir, (((time.strftime('%Y%m%d_%H%M') + '_') + name) + '.log'))), logging.StreamHandler()])
Setup the logging device to log into a uniquely created directory.

Args:
    name: Name of the directory for the log-files.
    dir: Optional sub-directory within log
def setup_logging(name, dir=):
    '\n    Setup the logging device to log into a uniquely created directory.\n\n    Args:\n        name: Name of the directory for the log-files.\n        dir: Optional sub-directory within log\n    '
    global log_name
    log_name = name
    global log_dir
    log_dir = os.path.join('log', dir)
    if (not os.path.isdir(log_dir)):
        os.makedirs(log_dir)
    reload(logging)
    logging.basicConfig(level=logging.INFO, format='[%(levelname)-5.5s %(asctime)s] %(message)s', datefmt='%H:%M:%S', handlers=[logging.FileHandler(os.path.join(log_dir, (((time.strftime('%Y%m%d_%H%M') + '_') + name) + '.log'))), logging.StreamHandler()])