]> git.ralfj.de Git - saartuer.git/blobdiff - libtuer.py
we MOVED
[saartuer.git] / libtuer.py
diff --git a/libtuer.py b/libtuer.py
deleted file mode 100644 (file)
index a655fcd..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-import logging, logging.handlers, syslog, os
-
-# logging function
-class Logger:
-       def __init__ (self):
-               import __main__ as main
-               self.name = os.path.basename(main.__file__)
-               self.logger = logging.getLogger(self.name)
-               self.logger.setLevel(logging.INFO)
-               self.handler = logging.handlers.SysLogHandler(address = '/dev/log', facility = logging.handlers.SysLogHandler.LOG_LOCAL0)
-               self.logger.addHandler(self.handler)
-       def log (self, what):
-               thestr = "%s[%d]: %s" % (self.name,os.getpid(),what)
-               print (thestr)
-               self.logger.info(thestr)
-
-logger = Logger()
-
-def log (what):
-       logger.log(what)