コード例 #1
0
ファイル: LogStreamConsole.py プロジェクト: Phrohdoh/Projeny
    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)
コード例 #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)
コード例 #3
0
ファイル: LogStreamConsole.py プロジェクト: Phrohdoh/Projeny
 def _initColors(self):
     self._defaultColors = ColorConsole.get_text_attr()
     self._defaultBg = self._defaultColors & 0x0070
     self._defaultFg = self._defaultColors & 0x0007
コード例 #4
0
 def _initColors(self):
     self._defaultColors = ColorConsole.get_text_attr()
     self._defaultBg = self._defaultColors & 0x0070
     self._defaultFg = self._defaultColors & 0x0007