community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1709038 - /comdev/projects.apache.org/scripts/cronjobs/testlogging.py
Date Fri, 16 Oct 2015 15:26:23 GMT
Author: sebb
Date: Fri Oct 16 15:26:23 2015
New Revision: 1709038

URL: http://svn.apache.org/viewvc?rev=1709038&view=rev
Log:
Allow test errtee logging

Added:
    comdev/projects.apache.org/scripts/cronjobs/testlogging.py   (with props)

Added: comdev/projects.apache.org/scripts/cronjobs/testlogging.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/testlogging.py?rev=1709038&view=auto
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/testlogging.py (added)
+++ comdev/projects.apache.org/scripts/cronjobs/testlogging.py Fri Oct 16 15:26:23 2015
@@ -0,0 +1,14 @@
+# sample script to test logging of stdout and STDERR
+
+import sys
+import os
+import errtee
+
+print("Stdout1")
+if 'ERRTEE' in os.environ:
+    print("ERRTEE=%s" % os.environ['ERRTEE'])
+else:
+    print("ERRTEE is not defined")
+print("Stderr2", file=sys.stderr) # should appear in log file if ERRTEE is defined
+print("Stdout3")
+raise Exception("Except") # should appear in log file if ERRTEE is defined

Propchange: comdev/projects.apache.org/scripts/cronjobs/testlogging.py
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message