def log_warning(text): """ Prints a WARNING message to stdout. :param text: """ utils.log_write_entry(sys.stdout, "WARNING", text)
def log_info(text): """ Prints a INFO message to stdout. :param text: """ utils.log_write_entry(sys.stdout, "INFO", text)
def log_error(text, exception=None): """ Prints a ERROR message and exception to stderr. :param text: :param exception: """ utils.log_write_entry(sys.stderr, "ERROR", text, exception) # in case we send to somewhere else also send it to the standard error output (console) if sys.stderr is not sys.__stderr__: utils.log_write_entry(sys.__stderr__, "ERROR", text, exception)