No bug: Reduce IPDL-compiler spew and stop logging to stderr. irc-r=bsmedberg
authorChris Jones <jones.chris.g@gmail.com>
Thu, 13 May 2010 17:25:20 -0500
changeset 42303 bc3db67ad44396bed2f7cb05b6ccb12da98a2088
parent 42302 11edbb06abc02d5319969c0ad3cc10b2a84683c9
child 42304 7b02623b93fec9169869f6451c7b42e9b2aa437d
push id13266
push usercjones@mozilla.com
push dateThu, 13 May 2010 22:24:25 +0000
treeherdermozilla-central@bc3db67ad443 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
No bug: Reduce IPDL-compiler spew and stop logging to stderr. irc-r=bsmedberg
ipc/ipdl/ipdl.py
--- a/ipc/ipdl/ipdl.py
+++ b/ipc/ipdl/ipdl.py
@@ -32,17 +32,17 @@
 
 import optparse, os, re, sys
 from cStringIO import StringIO
 
 import ipdl
 
 def log(minv, fmt, *args):
     if _verbosity >= minv:
-        print >>sys.stderr, fmt % args
+        print fmt % args
 
 # process command line
 
 op = optparse.OptionParser(usage='ipdl.py [options] IPDLfiles...')
 op.add_option('-I', '--include', dest='includedirs', default=[ ],
               action='append',
               help='Additional directory to search for included protocol specifications')
 op.add_option('-v', '--verbose', dest='verbosity', default=1, action='count',
@@ -65,23 +65,23 @@ options, files = op.parse_args()
 _verbosity = options.verbosity
 headersdir = options.headersdir
 cppdir = options.cppdir
 includedirs = [ os.path.abspath(incdir) for incdir in options.includedirs ]
 
 if not len(files):
     op.error("No IPDL files specified")
 
-log(1, 'Generated C++ headers will be generated relative to "%s"', headersdir)
-log(1, 'Generated C++ sources will be generated in "%s"', cppdir)
+log(2, 'Generated C++ headers will be generated relative to "%s"', headersdir)
+log(2, 'Generated C++ sources will be generated in "%s"', cppdir)
 
 allprotocols = []
 
 for f in files:
-    log(1, 'Parsing specification %s', f)
+    log(1, os.path.basename(f))
     if f == '-':
         fd = sys.stdin
         filename = '<stdin>'
     else:
         fd = open(f)
         filename = f
 
     specstring = fd.read()