提交 171a6db3 编写于 作者: S Steven Li

Adjust crash_gen tool to direct logging output to STDOUT, instead of STDERR

上级 204792c5
......@@ -2,6 +2,7 @@ import threading
import random
import logging
import os
import sys
import taos
......@@ -53,7 +54,7 @@ class Logging:
# global misc.logger
_logger = logging.getLogger('CrashGen') # real logger
_logger.addFilter(LoggingFilter())
ch = logging.StreamHandler()
ch = logging.StreamHandler(sys.stdout) # Ref: https://stackoverflow.com/questions/14058453/making-python-loggers-output-all-messages-to-stdout-in-addition-to-log-file
_logger.addHandler(ch)
# Logging adapter, to be used as a logger
......
......@@ -19,5 +19,5 @@ if __name__ == "__main__":
mExec.init()
exitCode = mExec.run()
print("Exiting with code: {}".format(exitCode))
print("\nCrash_Gen is now exiting with status code: {}".format(exitCode))
sys.exit(exitCode)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册