Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
3c0ef842
Unverified
Commit
3c0ef842
authored
Mar 17, 2020
by
SparkSnail
Committed by
GitHub
Mar 17, 2020
Browse files
Add flush in trial_keeper log (#2156)
parent
e16c4019
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tools/nni_trial_tool/log_utils.py
tools/nni_trial_tool/log_utils.py
+1
-1
No files found.
tools/nni_trial_tool/log_utils.py
View file @
3c0ef842
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment