Allow setting debug mode from command line
Adds a --debug option to the command-line that enables debug mode when running the sushy-emulator. This should simplify debugging and development. Change-Id: Ibf420dc3324b00548f55e4efd8610a61ded10dd3
This commit is contained in:
parent
74318321aa
commit
e7dbba93f1
5
releasenotes/notes/debug-mode-0dccdc3702c0590e.yaml
Normal file
5
releasenotes/notes/debug-mode-0dccdc3702c0590e.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds an option --debug to enable debug mode when running sushy-emulator.
|
||||
|
@ -779,6 +779,8 @@ def parse_args():
|
||||
type=str,
|
||||
help='Config file path. Can also be set via '
|
||||
'environment variable SUSHY_EMULATOR_CONFIG.')
|
||||
parser.add_argument('--debug', action='store_true',
|
||||
help='Enables debug mode when running sushy-emulator.')
|
||||
parser.add_argument('-i', '--interface',
|
||||
type=str,
|
||||
help='IP address of the local interface to listen '
|
||||
@ -819,6 +821,8 @@ def main():
|
||||
|
||||
args = parse_args()
|
||||
|
||||
app.debug = args.debug
|
||||
|
||||
if args.config:
|
||||
app.config.from_pyfile(args.config)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user