summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/FileMonitor/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/FileMonitor/__init__.py')
-rw-r--r--src/lib/Bcfg2/Server/FileMonitor/__init__.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/Bcfg2/Server/FileMonitor/__init__.py b/src/lib/Bcfg2/Server/FileMonitor/__init__.py
index 72b1d2dd7..dad0db44e 100644
--- a/src/lib/Bcfg2/Server/FileMonitor/__init__.py
+++ b/src/lib/Bcfg2/Server/FileMonitor/__init__.py
@@ -50,6 +50,7 @@ import sys
import fnmatch
import logging
from time import sleep, time
+from Bcfg2.Server.Plugin import Debuggable
LOGGER = logging.getLogger(__name__)
@@ -104,7 +105,7 @@ class Event(object):
return "%s (request ID %s)" % (str(self), self.requestID)
-class FileMonitor(object):
+class FileMonitor(Debuggable):
""" The base class that all FAM implementions must inherit.
The simplest instance of a FileMonitor subclass needs only to add
@@ -128,8 +129,8 @@ class FileMonitor(object):
.. -----
.. autoattribute:: __priority__
"""
- #: Whether or not to produce debug logging
- self.debug = debug
+ Debuggable.__init__(self, name="FileMonitor")
+ self.debug_flag = debug
#: A dict that records which objects handle which events.
#: Keys are monitor handle IDs and values are objects whose
@@ -168,13 +169,6 @@ class FileMonitor(object):
example of this. """
self.started = True
- def debug_log(self, msg):
- """ Log a debug message.
-
- :param msg: The message to log iff :attr:`debug` is set."""
- if self.debug:
- LOGGER.info(msg)
-
def should_ignore(self, event):
""" Returns True if an event should be ignored, False
otherwise. For events that include the full path, both the