Merge branch 'master' of ralfj.de:saartuer
authorConstantin Berhard <constantin@exxxtremesys.lu>
Wed, 9 Oct 2013 19:04:00 +0000 (21:04 +0200)
committerConstantin Berhard <constantin@exxxtremesys.lu>
Wed, 9 Oct 2013 19:04:00 +0000 (21:04 +0200)
libtuer.py
statemachine.jpg [new file with mode: 0644]
statemachine.odg [new file with mode: 0644]

index 5b1221c173865efab6efa3ce1f55b32af891f2c8..1f8a034713795b1d32c10cc8695db0d19692df69 100644 (file)
@@ -3,15 +3,13 @@ import logging, logging.handlers, os, time, queue, threading, subprocess
 # 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 = logging.getLogger("tuerd")
                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, lvl, what):
-               thestr = "%s[%d]: %s" % (self.name,os.getpid(),what)
+               thestr = "%s[%d]: %s" % ("osspd", os.getpid(), what)
                print (thestr)
                self.logger.log(lvl, thestr)
        
diff --git a/statemachine.jpg b/statemachine.jpg
new file mode 100644 (file)
index 0000000..4643df3
Binary files /dev/null and b/statemachine.jpg differ
diff --git a/statemachine.odg b/statemachine.odg
new file mode 100644 (file)
index 0000000..4af2320
Binary files /dev/null and b/statemachine.odg differ