Add pysawsim.manager and pysawsim.manager.thread for running asynchronous jobs.
[sawsim.git] / pysawsim / __init__.py
index cc179d9f09eba199fbac1088d436404e5d882bbb..f5b7e64447e260673fac11302ec1c43a8050382f 100644 (file)
@@ -44,3 +44,23 @@ Adding tests to modules
 
 Just go crazy with doctests and unittests; nose_ will find them.
 """
+
+import logging
+import logging.handlers
+import sys
+
+
+__version__ = '0.10'  # match sawsim version
+
+def log():
+    return logging.getLogger('pysawsim')
+
+_log = log()
+_log.setLevel(logging.DEBUG)
+_console = logging.StreamHandler()
+_formatter = logging.Formatter('%(name)-8s: %(levelname)-6s %(message)s')
+_console.setFormatter(_formatter)
+_log.addHandler(_console)
+del(_log)
+del(_console)
+del(_formatter)