dhunter/core/log.py
def _format_log_line(message=None, color=None, stacktrace_postfix=None):
        """Formats log message, adding required indentation and stuff.

        Args:
          message: message to format
          color: COLOR_xxx or ANSI_xxx color code to use if line should be colored
          stacktrace_postfix:

        Returns:
          Formatted log line
        """
        if message is not None:
            message = ' ' * (Log.log_level * 2) + Log.substitute_ansi(message)

            if Log.is_debug():
                message = '%d: %s' % (Log.log_level, message)

            if color is not None:
                message = color + message

            message += Log.ANSI_RESET

            if stacktrace_postfix is not None:
                message += stacktrace_postfix

            if Log.no_color:
                message = Log.strip_ansi(message)

        return message
Formats log message, adding required indentation and stuff.

        Args:
          message: message to format
          color: COLOR_xxx or ANSI_xxx color code to use if line should be colored
          stacktrace_postfix:

        Returns:
          Formatted log line
        
Formats log message, adding required indentation and stuff.
Formats log message adding required indentation and stuff .
def _format_log_line(message=None, color=None, stacktrace_postfix=None):
        if message is not None:
            message = ' ' * (Log.log_level * 2) + Log.substitute_ansi(message)
            if Log.is_debug():
                message = '%d: %s' % (Log.log_level, message)
            if color is not None:
                message = color + message
            message += Log.ANSI_RESET
            if stacktrace_postfix is not None:
                message += stacktrace_postfix
            if Log.no_color:
                message = Log.strip_ansi(message)
        return message
def _format_log_line ( message = None , color = None , stacktrace_postfix = None ) : if message is not None : message = ' ' * ( Log . log_level * 2 ) + Log . substitute_ansi ( message ) if Log . is_debug ( ) : message = '%d: %s' % ( Log . log_level , message ) if color is not None : message = color + message message += Log . ANSI_RESET if stacktrace_postfix is not None : message += stacktrace_postfix if Log . no_color : message = Log . strip_ansi ( message ) return message
Formats log message, adding required indentation and stuff.
Formats log message adding required indentation and stuff .
"""Formats log message, adding required indentation and stuff.

        Args:
          message: message to format
          color: COLOR_xxx or ANSI_xxx color code to use if line should be colored
          stacktrace_postfix:

        Returns:
          Formatted log line
        """
Formatted log line
Formatted log line
message
message to format
message to format
color
COLOR_xxx or ANSI_xxx color code to use if line should be colored
COLOR_xxx or ANSI_xxx color code to use if line should be colored
stacktrace_postfix
None