changeset 233:451aac9888f5

Use proper logging in distutils `compile_catalog` command.
author cmlenz
date Sun, 29 Jul 2007 20:04:17 +0000
parents 1448b500de40
children 541b6d630575
files babel/messages/frontend.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/babel/messages/frontend.py
+++ b/babel/messages/frontend.py
@@ -145,20 +145,20 @@
                 for message in list(catalog)[1:]:
                     if message.string:
                         translated +=1
-                print "%d of %d messages (%d%%) translated in %r" % (
-                    translated, len(catalog), translated * 100 // len(catalog),
-                    po_file
-                )
+                log.info('%d of %d messages (%d%%) translated in %r',
+                         translated, len(catalog),
+                         translated * 100 // len(catalog), po_file)
 
             if catalog.fuzzy and not self.use_fuzzy:
-                print 'catalog %r is marked as fuzzy, skipping' % (po_file)
+                log.warn('catalog %r is marked as fuzzy, skipping', po_file)
                 continue
 
             for message, errors in catalog.check():
                 for error in errors:
-                    print 'error: %s:%d: %s' % (po_file, message.lineno, error)
+                    log.error('error: %s:%d: %s', po_file, message.lineno,
+                              error)
 
-            print 'compiling catalog %r to %r' % (po_file, mo_file)
+            log.info('compiling catalog %r to %r', po_file, mo_file)
 
             outfile = open(mo_file, 'w')
             try:
Copyright (C) 2012-2017 Edgewall Software