diff python/c3/builder.py @ 254:bd26dc13f270

Added logger
author Windel Bouwman
date Wed, 31 Jul 2013 21:20:58 +0200
parents 6ed3d3a82a63
children 7416c923a02a
line wrap: on
line diff
--- a/python/c3/builder.py	Wed Jul 31 17:57:03 2013 +0200
+++ b/python/c3/builder.py	Wed Jul 31 21:20:58 2013 +0200
@@ -1,3 +1,4 @@
+import logging
 import ppci
 from . import Parser, TypeChecker, Analyzer, CodeGenerator
 from . astprinter import AstPrinter
@@ -9,6 +10,7 @@
         Reports errors to the diagnostics system
     """
     def __init__(self, diag):
+        self.logger = logging.getLogger('c3')
         self.diag = diag
         self.parser = Parser(diag)
         self.tc = TypeChecker(diag)
@@ -34,6 +36,7 @@
         pkg = self.parser.parseSource(src)
         if not pkg:
             return
+        logging.getLogger('c3').info('Source parsed')
 
         # TODO: merge the two below?
         #AstPrinter().printAst(pkg)