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

This commit is contained in:
Steven Li 2020-12-24 06:28:57 +00:00
parent 204792c510
commit 171a6db3e7
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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)