[csw-devel] SF.net SVN: gar:[18145] csw/mgar/gar/v2/lib/python/integrate_catalogs.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon May 28 15:13:44 CEST 2012


Revision: 18145
          http://gar.svn.sourceforge.net/gar/?rev=18145&view=rev
Author:   wahwah
Date:     2012-05-28 13:13:44 +0000 (Mon, 28 May 2012)
Log Message:
-----------
integrate-catalogs: INFO logging level by default

...with --debug on request.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/integrate_catalogs.py

Modified: csw/mgar/gar/v2/lib/python/integrate_catalogs.py
===================================================================
--- csw/mgar/gar/v2/lib/python/integrate_catalogs.py	2012-05-28 13:12:21 UTC (rev 18144)
+++ csw/mgar/gar/v2/lib/python/integrate_catalogs.py	2012-05-28 13:13:44 UTC (rev 18145)
@@ -225,8 +225,13 @@
       dest="include_version_changes",
       default=True, action="store_false",
       help="Skip version upgrades (only accept revision upgrades).")
+  parser.add_option("--debug", dest="debug",
+                    default=False, action="store_true")
   options, args = parser.parse_args()
-  logging.basicConfig(level=logging.DEBUG)
+  loglevel = logging.INFO
+  if options.debug:
+    loglevel = logging.DEBUG
+  logging.basicConfig(level=loglevel)
   if not options.output_file:
     raise UsageError("Please specify the output file.  See --help.")
   catrel_from = options.catrel_from

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