Skip to content

Commit

Permalink
Improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
venthur committed Oct 7, 2017
1 parent 8b7b354 commit 6ef41ea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/gscholar
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import os
import gscholar as gs


logger = logging.getLogger(__name__)
logger = logging.getLogger('gscholar')
logging.basicConfig(
format='%(asctime)s %(levelname)s %(name)s %(message)s',
level=logging.WARNING
)

if __name__ == "__main__":
usage = 'Usage: %prog [options] {pdf | "search terms"}'
Expand All @@ -26,7 +30,7 @@ if __name__ == "__main__":
help="Page number to start parsing PDF file at.")
(options, args) = parser.parse_args()
if options.debug is True:
logging.basicConfig(level=logging.DEBUG)
logger.setLevel(logging.DEBUG)
if options.output == 'bibtex':
outformat = gs.FORMAT_BIBTEX
elif options.output == 'endnote':
Expand Down

0 comments on commit 6ef41ea

Please sign in to comment.