Set up default logging

This commit is contained in:
Ben Firshman 2013-12-13 19:19:44 +00:00
parent 3b654ad349
commit 8005254138
1 changed files with 11 additions and 0 deletions

View File

@ -16,7 +16,18 @@ from .docopt_command import NoSuchCommand
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
def main(): def main():
console_handler = logging.StreamHandler()
console_handler.setFormatter(logging.Formatter())
console_handler.setLevel(logging.INFO)
root_logger = logging.getLogger()
root_logger.addHandler(console_handler)
root_logger.setLevel(logging.DEBUG)
# Disable requests logging
logging.getLogger("requests").propagate = False
try: try:
command = TopLevelCommand() command = TopLevelCommand()
command.sys_dispatch() command.sys_dispatch()