Update of /cvsroot/pygccxml/source/pygccxml/parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15458/pygccxml/parser
Modified Files:
declarations_cache.py project_reader.py scanner.py
source_reader.py
Log Message:
- Remove data and time from logger filter
- Use logger info(), error(), and warning() instead of just debug()
Index: scanner.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pygccxml/parser/scanner.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** scanner.py 2 Mar 2006 05:53:14 -0000 1.21
--- scanner.py 9 Mar 2006 01:46:15 -0000 1.22
***************
*** 193,197 ****
self.__files[ attrs[XML_AN_ID] ] = obj
else:
! logger.debug( 'Unknown object type has been found.'
+ ' Please report this bug to pygccxml development team.' )
--- 193,197 ----
self.__files[ attrs[XML_AN_ID] ] = obj
else:
! logger.warning( 'Unknown object type has been found.'
+ ' Please report this bug to pygccxml development team.' )
Index: declarations_cache.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pygccxml/parser/declarations_cache.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** declarations_cache.py 2 Mar 2006 05:53:14 -0000 1.11
--- declarations_cache.py 9 Mar 2006 01:46:15 -0000 1.12
***************
*** 152,164 ****
cache_file_obj = file( file_name, 'rb' )
try:
! logger.debug( "Loading cache file ..." )
start_time = time.clock()
cache = cPickle.load( cache_file_obj )
! logger.debug( "Cache file has been loaded in %.1f secs"%( time.clock() - start_time ) )
! logger.debug( "Found cache in file: [%s] entries: %s"
% ( file_name, len( cache.keys() ) ) )
except Exception, error:
cache_file_obj.close()
! logger.debug( "Invalid cache file: [%s] Regenerating." % file_name )
file(file_name, 'w+b').close() # Create empty file
cache = {} # Empty cache
--- 152,164 ----
cache_file_obj = file( file_name, 'rb' )
try:
! logger.info( "Loading cache file ..." )
start_time = time.clock()
cache = cPickle.load( cache_file_obj )
! logger.info( "Cache file has been loaded in %.1f secs"%( time.clock() - start_time ) )
! logger.info( "Found cache in file: [%s] entries: %s"
% ( file_name, len( cache.keys() ) ) )
except Exception, error:
cache_file_obj.close()
! logger.info( "Invalid cache file: [%s] Regenerating." % file_name )
file(file_name, 'w+b').close() # Create empty file
cache = {} # Empty cache
***************
*** 177,181 ****
del self.__cache[key]
if num_removed > 0:
! logger.debug( "There are %s removed entries from cache." % num_removed )
# Save out the cache to disk
cache_file = file( self.__name, 'w+b' )
--- 177,181 ----
del self.__cache[key]
if num_removed > 0:
! logger.info( "There are %s removed entries from cache." % num_removed )
# Save out the cache to disk
cache_file = file( self.__name, 'w+b' )
Index: source_reader.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pygccxml/parser/source_reader.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** source_reader.py 5 Mar 2006 06:26:13 -0000 1.26
--- source_reader.py 9 Mar 2006 01:46:15 -0000 1.27
***************
*** 107,111 ****
command_line = self.__create_command_line( ffname, gccxml_file )
if self.__config.verbose:
! logger.debug( " Command line for GCC-XML: %s" % command_line )
input, output = os.popen4( command_line )
input.close()
--- 107,111 ----
command_line = self.__create_command_line( ffname, gccxml_file )
if self.__config.verbose:
! logger.info( " Command line for GCC-XML: %s" % command_line )
input, output = os.popen4( command_line )
input.close()
***************
*** 147,155 ****
ffname = self.__file_full_name(source_file)
if self.__config.verbose:
! logger.debug( "Reading source file: [%s]." % ffname )
declarations = self.__dcache.cached_value( ffname, self.__config )
if not declarations:
if self.__config.verbose:
! logger.debug( "File has not been found in cache, parsing..." )
gccxml_file = self.create_xml_file( ffname )
declarations, files = self.__parse_gccxml_created_file( gccxml_file )
--- 147,155 ----
ffname = self.__file_full_name(source_file)
if self.__config.verbose:
! logger.info( "Reading source file: [%s]." % ffname )
declarations = self.__dcache.cached_value( ffname, self.__config )
if not declarations:
if self.__config.verbose:
! logger.info( "File has not been found in cache, parsing..." )
gccxml_file = self.create_xml_file( ffname )
declarations, files = self.__parse_gccxml_created_file( gccxml_file )
***************
*** 157,161 ****
else:
if self.__config.verbose:
! logger.debug( "File has not been changed, reading declarations from cache." )
except Exception, error:
--- 157,161 ----
else:
if self.__config.verbose:
! logger.info( "File has not been changed, reading declarations from cache." )
except Exception, error:
***************
*** 169,173 ****
def read_xml_file(self, gccxml_created_file):
if self.__config.verbose:
! logger.debug( "Reading xml file: [%s]" % gccxml_created_file )
declarations, files = self.__parse_gccxml_created_file( gccxml_created_file )
--- 169,173 ----
def read_xml_file(self, gccxml_created_file):
if self.__config.verbose:
! logger.info( "Reading xml file: [%s]" % gccxml_created_file )
declarations, files = self.__parse_gccxml_created_file( gccxml_created_file )
Index: project_reader.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pygccxml/parser/project_reader.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** project_reader.py 8 Mar 2006 08:38:53 -0000 1.25
--- project_reader.py 9 Mar 2006 01:46:15 -0000 1.26
***************
*** 126,130 ****
config = self.__config.clone()
if config.verbose:
! logger.debug( "Reading project files: file by file" )
for prj_file in files:
reader = None
--- 126,130 ----
config = self.__config.clone()
if config.verbose:
! logger.info( "Reading project files: file by file" )
for prj_file in files:
reader = None
***************
*** 157,173 ****
namespaces.append( decls )
if config.verbose:
! logger.debug( "Flushing cache... " )
start_time = time.clock()
self.__dcache.flush()
if config.verbose:
! logger.debug( "Cache has been fkushed in %.1f secs"
% ( time.clock() - start_time ) )
answer = []
if config.verbose:
! logger.debug( "Joining namespaces ..." )
for file_nss in namespaces:
answer = self._join_top_namespaces( answer, file_nss )
if config.verbose:
! logger.debug( "Joining declarations ..." )
for ns in answer:
if isinstance( ns, pygccxml.declarations.namespace_t ):
--- 157,173 ----
namespaces.append( decls )
if config.verbose:
! logger.info( "Flushing cache... " )
start_time = time.clock()
self.__dcache.flush()
if config.verbose:
! logger.info( "Cache has been fkushed in %.1f secs"
% ( time.clock() - start_time ) )
answer = []
if config.verbose:
! logger.info( "Joining namespaces ..." )
for file_nss in namespaces:
answer = self._join_top_namespaces( answer, file_nss )
if config.verbose:
! logger.info( "Joining declarations ..." )
for ns in answer:
if isinstance( ns, pygccxml.declarations.namespace_t ):
***************
*** 176,180 ****
types = self.__declarated_types(answer)
if config.verbose:
! logger.debug( "Relinking declared types ..." )
self._relink_declarated_types( leaved_classes, types )
return answer
--- 176,180 ----
types = self.__declarated_types(answer)
if config.verbose:
! logger.info( "Relinking declared types ..." )
self._relink_declarated_types( leaved_classes, types )
return answer
***************
*** 183,187 ****
config = self.__config.clone()
if config.verbose:
! logger.debug( "Reading project files: all at once" )
header_content = []
for header in files:
--- 183,187 ----
config = self.__config.clone()
if config.verbose:
! logger.info( "Reading project files: all at once" )
header_content = []
for header in files:
|