- better logging of drivers
git-svn-id: http://moon:8086/svn/projects/HendiControl@363 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import time
|
||||
import abc
|
||||
import logging
|
||||
|
||||
|
||||
class ATemperatureSensor(abc.ABC):
|
||||
def __init__(self, name):
|
||||
self.name
|
||||
def log(self, s):
|
||||
d = {'user': self.name()}
|
||||
logging.info ("{}".format(s), extra=d)
|
||||
|
||||
@abc.abstractmethod
|
||||
def name(self):
|
||||
return self.name
|
||||
return ""
|
||||
|
||||
@abc.abstractmethod
|
||||
def temperature(self):
|
||||
|
||||
Reference in New Issue
Block a user