Commit d9e72b91 by David Ormsbee Committed by Calen Pennington

add commandline flag for logging level

parent 8131cb33
......@@ -4,6 +4,7 @@ Commandline tool for doing operations on Problems
"""
import argparse
import logging
import os.path
import sys
from cStringIO import StringIO
......@@ -18,9 +19,12 @@ def main():
parser.add_argument("command", choices=['test']) # Watch? Render? Open?
parser.add_argument("files", nargs="+", type=argparse.FileType('r'))
parser.add_argument("--seed", required=False, type=int)
parser.add_argument("--log-level", required=False, default="INFO",
choices=['info', 'debug', 'warn', 'error',
'INFO', 'DEBUG', 'WARN', 'ERROR'])
args = parser.parse_args()
log.setLevel(logging.INFO)
log.setLevel(args.log_level.upper())
old_stdout = sys.stdout
old_stderr = sys.stderr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment