def info(string, logger=None): """Prints a info message.""" if logger: logger.info(string) if get_os() == 'Windows': print('[i] ' + string) else: print(color_text('[i] ', 'cyan') + string)
def warning(string, logger=None): """Prints a warning message.""" if logger: logger.warning(string) if get_os() == 'Windows': print('[!] ' + string) else: print(color_text('[!] ', 'yellow') + string)
def error(string, logger=None): """Prints a error message.""" if logger: logger.error(string) if get_os() == 'Windows': print('[x] ' + string) else: print(color_text('[✗] ', 'magenta') + string)
def success(string, logger=None): """Prints a success message.""" if logger: logger.info(string) if get_os() == 'Windows': print('[+] ' + string) else: print(color_text('[✓] ', 'green') + string)
def subheader(string, logger=None): """Prints a subheader.""" if logger: logger.info(string) if get_os() == 'Windows': print('==> ' + string) else: print(color_text('==> ', 'blue') + string)
def header(string, logger=None): """Prints a header.""" if logger: logger.info(string) if get_os() == 'Windows': print('==> ' + string) else: print(color_text('==> ', 'green') + color_text(string, 'white'))