Use vlogging.main_decorator.
This commit is contained in:
parent
e938a100a0
commit
58bcc27051
1 changed files with 2 additions and 6 deletions
|
@ -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
|
other command, your arguments will go to the timesearch_modules file as
|
||||||
appropriate for your command.
|
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 argparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from voussoirkit import betterhelp
|
from voussoirkit import betterhelp
|
||||||
|
from voussoirkit import vlogging
|
||||||
|
|
||||||
from timesearch_modules import exceptions
|
from timesearch_modules import exceptions
|
||||||
|
|
||||||
|
@ -333,6 +328,7 @@ def get_submissions_gateway(args):
|
||||||
from timesearch_modules import get_submissions
|
from timesearch_modules import get_submissions
|
||||||
get_submissions.get_submissions_argparse(args)
|
get_submissions.get_submissions_argparse(args)
|
||||||
|
|
||||||
|
@vlogging.main_decorator
|
||||||
def main(argv):
|
def main(argv):
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
subparsers = parser.add_subparsers()
|
subparsers = parser.add_subparsers()
|
||||||
|
|
Loading…
Reference in a new issue