Use vlogging.main_decorator.

master
voussoir 2021-11-04 16:35:48 -07:00
parent e938a100a0
commit 58bcc27051
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 2 additions and 6 deletions

View File

@ -5,16 +5,11 @@ When you run `python timesearch.py get_submissions -r subredditname` or any
other command, your arguments will go to the timesearch_modules file as
appropriate for your command.
'''
import logging
handler = logging.StreamHandler()
log_format = '{levelname}:timesearch.{module}.{funcName}: {message}'
handler.setFormatter(logging.Formatter(log_format, style='{'))
logging.getLogger().addHandler(handler)
import argparse
import sys
from voussoirkit import betterhelp
from voussoirkit import vlogging
from timesearch_modules import exceptions
@ -333,6 +328,7 @@ def get_submissions_gateway(args):
from timesearch_modules import get_submissions
get_submissions.get_submissions_argparse(args)
@vlogging.main_decorator
def main(argv):
parser = argparse.ArgumentParser(description=__doc__)
subparsers = parser.add_subparsers()