Unverified Commit 3c0ef842 authored by SparkSnail's avatar SparkSnail Committed by GitHub
Browse files

Add flush in trial_keeper log (#2156)

parent e16c4019
...@@ -36,7 +36,7 @@ class StdOutputType(Enum): ...@@ -36,7 +36,7 @@ class StdOutputType(Enum):
def nni_log(log_type, log_message): def nni_log(log_type, log_message):
'''Log message into stdout''' '''Log message into stdout'''
dt = datetime.now() dt = datetime.now()
print('[{0}] {1} {2}'.format(dt, log_type.value, log_message)) print('[{0}] {1} {2}'.format(dt, log_type.value, log_message), flush=True)
class NNIRestLogHanlder(StreamHandler): class NNIRestLogHanlder(StreamHandler):
def __init__(self, host, port, tag, std_output_type=StdOutputType.Stdout): def __init__(self, host, port, tag, std_output_type=StdOutputType.Stdout):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment