File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import argparse
4
4
import io
5
+ import logging
5
6
import os
6
7
import sys
7
8
import textwrap
@@ -475,6 +476,12 @@ def main(argv=None):
475
476
description = '{}.' .format (__desc__ ),
476
477
formatter_class = SubcommandHelpFormatter )
477
478
479
+ parser .add_argument (
480
+ '--trace' ,
481
+ help = "Trace execution" ,
482
+ action = "store_const" ,
483
+ dest = "loglevel" ,
484
+ const = logging .INFO )
478
485
parser .add_argument (
479
486
'-c' ,
480
487
dest = 'config_overrides' ,
@@ -539,6 +546,7 @@ def main(argv=None):
539
546
# useful to show to the user instead of an error because of missing
540
547
# subcommand
541
548
args = parser .parse_args (argv or sys .argv [1 :] or ["help" ])
549
+ logging .basicConfig (level = args .loglevel or logging .WARNING )
542
550
config = compdb .config .LazyTypedConfig (config_schema )
543
551
544
552
if args .config_overrides :
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ _compdb() {
132
132
# TODO: smart completion of -c argument: section.option=value
133
133
' *-c[set value of configuration variable NAME for this invocation]:key:'
134
134
' *-p[build path]:build directory:_files -/'
135
+ ' --trace[trace execution]'
135
136
)
136
137
137
138
local curcontext=" $curcontext " state line
You can’t perform that action at this time.
0 commit comments