Commit 8636efd
committed
qgs: add --verbose & --debug parameters to control logging
Currently qgs prints all log messages to syslog or stderr
unconditionally, even those at QGS_LOG_LEVEL_INFO. At the
same time it hardcodes SGX_QL_LOG_ERROR for the quote
provider library making it impossible to debug that part
of the code.
This adds --verbose and --debug parameters to QGS with the
following behaviour
* Messages from QGS code at QGS_LOG_LEVEL_INFO are discarded
unless --verbose is set. This makes QGS quiet by default,
only printing warnings/errors.
* Messages from the quote provider library are requested at
SGX_QL_LOG_INFO instead of SGX_QL_LOG_ERROR if --debug
is set. This output is very volumous, dumping HTTP request
and response info, hence putting it behind --debug, instead
of enabling it with the former --verbose flag.
* Enabling --debug will imply --verbose, so setting both is
redundant, albeit harmless
Signed-off-by: Daniel P. Berrangé <[email protected]>1 parent fb78693 commit 8636efd
File tree
4 files changed
+19
-6
lines changed- QuoteGeneration/quote_wrapper/qgs
4 files changed
+19
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
| 116 | + | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
359 | | - | |
| 358 | + | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
117 | | - | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
| |||
0 commit comments