Awight has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/346586 )
Change subject: Mirror child process output to console
......................................................................
Mirror child process output to console
Bug: T162294
Change-Id: I79184671e345253c165d87cc5732d0b57a4b5896
---
M processcontrol/output_streamer.py
1 file changed, 6 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control
refs/changes/86/346586/1
diff --git a/processcontrol/output_streamer.py
b/processcontrol/output_streamer.py
index ce89d00..0728f68 100644
--- a/processcontrol/output_streamer.py
+++ b/processcontrol/output_streamer.py
@@ -1,5 +1,7 @@
+import logging
import logging.config
import os
+import sys
import threading
from . import config
@@ -72,6 +74,10 @@
self.logger.addHandler(self.log_file_handler)
+ if sys.stdout.isatty():
+ # Mirror to the console if run interactively.
+ self.logger.addHandler(logging.StreamHandler(sys.stdout))
+
# FIXME: gets written for each subprocess, so the name=slug is not
# quite right. Should be the commandline?
self.logger.info("===========")
--
To view, visit https://gerrit.wikimedia.org/r/346586
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I79184671e345253c165d87cc5732d0b57a4b5896
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits