summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/prserv/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/prserv/__init__.py')
-rw-r--r--bitbake/lib/prserv/__init__.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/bitbake/lib/prserv/__init__.py b/bitbake/lib/prserv/__init__.py
new file mode 100644
index 0000000..0e0c98b
--- /dev/null
+++ b/bitbake/lib/prserv/__init__.py
@@ -0,0 +1,14 @@
1__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 \ No newline at end of file