[commit: ghc] master: linters/check-cpp: Don't produce debug log (f5127c8)

git at git.haskell.org git at git.haskell.org
Mon Dec 7 11:14:38 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f5127c81ccb4d65f794b2b43fd3ad9b59c9a89d1/ghc

>---------------------------------------------------------------

commit f5127c81ccb4d65f794b2b43fd3ad9b59c9a89d1
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Mon Dec 7 10:53:44 2015 +0100

    linters/check-cpp: Don't produce debug log


>---------------------------------------------------------------

f5127c81ccb4d65f794b2b43fd3ad9b59c9a89d1
 .arc-linters/check-cpp.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/.arc-linters/check-cpp.py b/.arc-linters/check-cpp.py
index c58da09..1d07b4e 100755
--- a/.arc-linters/check-cpp.py
+++ b/.arc-linters/check-cpp.py
@@ -9,16 +9,19 @@ import os
 import json
 import re
 
-
-def setup_logging():
-    logger = logging.getLogger()
+def setup_logging(logger):
+    """
+    ``arc lint`` makes it quite tricky to catch debug output from linters.
+    Log to a file to work around this.
+    """
     hdlr = logging.FileHandler('linter.log', 'w')
     logger.addHandler(hdlr)
     logger.setLevel(logging.DEBUG)
     return logger
 
-logger = setup_logging()
-#logger.debug(sys.argv)
+logger = logging.getLogger()
+#setup_logging(logger)
+logger.debug(sys.argv)
 
 path = sys.argv[1]
 warnings = []



More information about the ghc-commits mailing list