projects
/
pgperffarm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8fe8b8
)
explicitly flush stdout in log()
author
Tomas Vondra
<tomas@2ndquadrant.com>
Thu, 13 Oct 2016 11:47:33 +0000
(13:47 +0200)
committer
Tomas Vondra
<tomas@2ndquadrant.com>
Mon, 27 Feb 2017 00:32:51 +0000
(
01:32
+0100)
Otherwise the messages may get buffered for a quite long time, which
is annoying, particularly in multi-process system.
client/utils/logging.py
patch
|
blob
|
blame
|
history
diff --git
a/client/utils/logging.py
b/client/utils/logging.py
index 9e12c887decff12bac06e9260e9ada52dbdde314..964480f802cbd539ae1fd44cbb63bdbb6be1de5c 100644
(file)
--- a/
client/utils/logging.py
+++ b/
client/utils/logging.py
@@
-1,3
+1,4
@@
+import sys
import time
def log(message):
@@
-7,3
+8,5
@@
def log(message):
'epoch' : time.time(),
'date' : time.strftime('%Y-%m-%d %H:%M:%S'),
'message' : message}
+
+ sys.stdout.flush()