Ejemplo n.º 1
0
    def _output(self, logType, message, stream, useColors):

        stream.write('\n')

        if self._log.hasHeading and logType != LogType.Heading and logType != LogType.HeadingSucceeded and logType != LogType.HeadingFailed:
            stream.write('  ')

        if not useColors or logType == LogType.Info:
            stream.write(message)
            stream.flush()
        else:
            ColorConsole.set_text_attr(self._getColorAttrs(logType))
            stream.write(message)
            stream.flush()
            ColorConsole.set_text_attr(self._defaultColors)
Ejemplo n.º 2
0
    def _output(self, logType, message, stream, useColors):

        stream.write('\n')

        if self._log.hasHeading and logType != LogType.Heading and logType != LogType.HeadingSucceeded and logType != LogType.HeadingFailed:
            stream.write('  ')

        if not useColors or logType == LogType.Info:
            stream.write(message)
            stream.flush()
        else:
            ColorConsole.set_text_attr(self._getColorAttrs(logType))
            stream.write(message)
            stream.flush()
            ColorConsole.set_text_attr(self._defaultColors)
Ejemplo n.º 3
0
 def _initColors(self):
     self._defaultColors = ColorConsole.get_text_attr()
     self._defaultBg = self._defaultColors & 0x0070
     self._defaultFg = self._defaultColors & 0x0007
Ejemplo n.º 4
0
 def _initColors(self):
     self._defaultColors = ColorConsole.get_text_attr()
     self._defaultBg = self._defaultColors & 0x0070
     self._defaultFg = self._defaultColors & 0x0007