Commit 92ea5d27 authored by Marco Mariani's avatar Marco Mariani

add --logfile as an alias to --log-file

parent d0d29df5
...@@ -60,9 +60,21 @@ class SlapOSApp(cliff.app.App): ...@@ -60,9 +60,21 @@ class SlapOSApp(cliff.app.App):
) )
def build_option_parser(self, *args, **kw): def build_option_parser(self, *args, **kw):
kw.setdefault('argparse_kwargs', {})
kw['argparse_kwargs']['conflict_handler'] = 'resolve'
parser = super(SlapOSApp, self).build_option_parser(*args, **kw) parser = super(SlapOSApp, self).build_option_parser(*args, **kw)
# add an alias for --log-file
parser.add_argument(
'--log-file', '--logfile',
action='store',
default=None,
help='Specify a file to log output. Disabled by default.',
)
# always show tracebacks on errors # always show tracebacks on errors
parser.set_defaults(debug=True) parser.set_defaults(debug=True)
return parser return parser
def initialize_app(self, argv): def initialize_app(self, argv):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment