diff --git a/voussoirkit/operatornotify.py b/voussoirkit/operatornotify.py index 172a969..d34c0d4 100644 --- a/voussoirkit/operatornotify.py +++ b/voussoirkit/operatornotify.py @@ -239,14 +239,14 @@ def main_decorator(subject, *, log_return_value=True, **kwargs): 3. Wrap main call with main_log_context. ''' def wrapper(main): - def wrapped(argv): + def wrapped(argv, *args, **kwargs): (argv, level) = get_level_by_argv(argv) if level is None: - return main(argv) + return main(argv, *args, **kwargs) context = main_log_context(subject, level, **kwargs) with context: - status = main(argv) + status = main(argv, *args, **kwargs) if log_return_value: log.info('Program finished, returned %s.', status) return status diff --git a/voussoirkit/vlogging.py b/voussoirkit/vlogging.py index 3509fe3..cd0a588 100644 --- a/voussoirkit/vlogging.py +++ b/voussoirkit/vlogging.py @@ -182,8 +182,8 @@ def main_decorator(main): to use --debug, --quiet, etc. on the command line without making any changes to your argparser. ''' - def wrapped(argv): + def wrapped(argv, *args, **kwargs): (level, argv) = get_level_by_argv(argv) add_root_handler(level) - return main(argv) + return main(argv, *args, **kwargs) return wrapped