From b244e2e92bb6bf93c7dc2e271ac1c87332de5c84 Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Fri, 17 Jan 2020 12:28:44 +0100 Subject: [PATCH] [ui] add verbose option --- meshroom/ui/app.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meshroom/ui/app.py b/meshroom/ui/app.py index 5e9c3a09..b8c124d6 100644 --- a/meshroom/ui/app.py +++ b/meshroom/ui/app.py @@ -69,9 +69,21 @@ class MeshroomApp(QApplication): help='Save the created scene.') parser.add_argument('-p', '--pipeline', metavar='MESHROOM_FILE/photogrammetry/hdri', type=str, default=os.environ.get("MESHROOM_DEFAULT_PIPELINE", "photogrammetry"), help='Override the default Meshroom pipeline with this external graph.') + parser.add_argument("--verbose", help="Verbosity level", default='warning', + choices=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],) args = parser.parse_args(args[1:]) + logStringToPython = { + 'fatal': logging.FATAL, + 'error': logging.ERROR, + 'warning': logging.WARNING, + 'info': logging.INFO, + 'debug': logging.DEBUG, + 'trace': logging.DEBUG, + } + logging.getLogger().setLevel(logStringToPython[args.verbose]) + QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) super(MeshroomApp, self).__init__(QtArgs)