Adamw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/113465

Change subject: Hush stdout logging unless we are running from a console
......................................................................

Hush stdout logging unless we are running from a console

Change-Id: I507936f8f0f4900f2fa45fdc367cabb863a6352c
---
M process/logging.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/65/113465/1

diff --git a/process/logging.py b/process/logging.py
index 4fd7e0c..56a086f 100644
--- a/process/logging.py
+++ b/process/logging.py
@@ -19,6 +19,7 @@
     @staticmethod
     def error(message):
         Logger.log(message, syslog.LOG_ERR)
+        print >>sys.stderr, message
 
     @staticmethod
     def fatal(message):
@@ -32,7 +33,6 @@
         syslog.syslog(severity, message)
         syslog.closelog()
 
-        # FIXME:
-        # if sys.stdout.isatty():
-        # or not config.quiet
-        print(message)
+        # FIXME: or not config.quiet
+        if sys.stdin.isatty():
+            print(message)

-- 
To view, visit https://gerrit.wikimedia.org/r/113465
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I507936f8f0f4900f2fa45fdc367cabb863a6352c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw <awi...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to