SF.net SVN: gar:[23180] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Mon Mar 10 21:57:41 CET 2014
Revision: 23180
http://sourceforge.net/p/gar/code/23180
Author: wahwah
Date: 2014-03-10 20:57:41 +0000 (Mon, 10 Mar 2014)
Log Message:
-----------
checkpkg: Run INFO level logging by default
This applies to the script collecting metadata from packages.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/collect_binary_elfinfo.py
csw/mgar/gar/v2/lib/python/collect_pkg_metadata.py
Modified: csw/mgar/gar/v2/lib/python/collect_binary_elfinfo.py
===================================================================
--- csw/mgar/gar/v2/lib/python/collect_binary_elfinfo.py 2014-03-10 20:57:33 UTC (rev 23179)
+++ csw/mgar/gar/v2/lib/python/collect_binary_elfinfo.py 2014-03-10 20:57:41 UTC (rev 23180)
@@ -229,7 +229,11 @@
if not options.input_file:
sys.stdout.write("Please provide input file name. See --help\n")
sys.exit(1)
- logging.basicConfig(level=logging.DEBUG)
+ logging_level = logging.INFO
+ if options.debug:
+ logging_level = logging.DEBUG
+ fmt = '%(levelname)s %(asctime)s %(filename)s:%(lineno)d %(message)s'
+ logging.basicConfig(format=fmt, level=logging_level)
extractor = ElfExtractor(options.input_file, debug=options.debug)
md5_sum = extractor.CollectBinaryElfinfo()
return_struct = {
Modified: csw/mgar/gar/v2/lib/python/collect_pkg_metadata.py
===================================================================
--- csw/mgar/gar/v2/lib/python/collect_pkg_metadata.py 2014-03-10 20:57:33 UTC (rev 23179)
+++ csw/mgar/gar/v2/lib/python/collect_pkg_metadata.py 2014-03-10 20:57:41 UTC (rev 23180)
@@ -613,7 +613,12 @@
if not options.input_file:
sys.stdout.write("Please provide an input file name. See --help\n")
sys.exit(1)
- logging.basicConfig(level=logging.DEBUG)
+
+ logging_level = logging.INFO
+ if options.debug:
+ logging_level = logging.DEBUG
+ fmt = '%(levelname)s %(asctime)s %(filename)s:%(lineno)d %(message)s'
+ logging.basicConfig(format=fmt, level=logging_level)
unpacker = Unpacker(options.input_file, debug=options.debug)
unpacked = unpacker.CollectStats(force_unpack=options.force_unpack)
unpacker.Cleanup()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list