blob: c3cb73ad92a3202df9cc009027753a74865d09f3 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001__version__ = "1.0.0"
2
3import os, time
4import sys,logging
5
6def init_logger(logfile, loglevel):
7 numeric_level = getattr(logging, loglevel.upper(), None)
8 if not isinstance(numeric_level, int):
9 raise ValueError('Invalid log level: %s' % loglevel)
10 FORMAT = '%(asctime)-15s %(message)s'
11 logging.basicConfig(level=numeric_level, filename=logfile, format=FORMAT)
12
13class NotFoundError(Exception):
14 pass