]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/python/location-query.in
Add quiet mode
[people/ms/libloc.git] / src / python / location-query.in
index 85d1cbf82ac41414d3d624cc0fd209f816df0ff8..c138644cd1c35a8acd206233b53741716bea7056 100644 (file)
@@ -121,6 +121,8 @@ class CLI(object):
                # Global configuration flags
                parser.add_argument("--debug", action="store_true",
                        help=_("Enable debug output"))
+               parser.add_argument("--quiet", action="store_true",
+                       help=_("Enable quiet mode"))
 
                # version
                parser.add_argument("--version", action="version",
@@ -204,9 +206,11 @@ class CLI(object):
 
                args = parser.parse_args()
 
-               # Enable debug logging
+               # Configure logging
                if args.debug:
                        location.logger.set_level(logging.DEBUG)
+               elif args.quiet:
+                       location.logger.set_level(logging.WARNING)
 
                # Print usage if no action was given
                if not "func" in args: