]> Frank Brehm's Git Trees - my-stuff/nagios.git/commitdiff
Marginales Zeug
authorFrank Brehm <frank@brehm-online.com>
Thu, 2 Dec 2010 18:28:32 +0000 (18:28 +0000)
committerFrank Brehm <frank@brehm-online.com>
Thu, 2 Dec 2010 18:28:32 +0000 (18:28 +0000)
git-svn-id: http://svn.brehm-online.com/svn/my-stuff/nagios/trunk@137 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa

bin/nagios/config.py

index a2ad4647aea76f9405cc34f53387c58b9571bcc5..ba5e8d2a4be2d8ccab6dfba9d24fde390d53ab8b 100644 (file)
@@ -55,11 +55,6 @@ class NagiosConfig(object):
     #------------------------------------------------------
     def __init__( self, new_file = file_name ):
         "Konstruktor."
-        self.file_name = self.canonize_file(new_file)
-        self.conf = {}
-        self.objects = {}
-        self.config_objects = {}
-        self.objects_read = {}
 
         # Logging-Setup
         self.logger = logging.getLogger('nagiosConfig')
@@ -73,6 +68,12 @@ class NagiosConfig(object):
 
         self.logger.addHandler(ch)
 
+        self.file_name = self.canonize_file(new_file)
+        self.conf = {}
+        self.objects = {}
+        self.config_objects = {}
+        self.objects_read = {}
+
     #------------------------------------------------------
     def __del__( self ):
         "Destruktor"
@@ -98,6 +99,8 @@ class NagiosConfig(object):
     def search_conf( self, f  = None ):
         "Sucht die Nagios-Konfigurationsdatei und speichert diese in self.file_name bzw. stirbt, wenn nicht gefunden."
 
+        self.logger.debug( "Searching for main configuration file ..." )
+
         if f is None: f = self.file_name
         if os.path.exists(f):
             if os.path.isfile(f):
@@ -116,6 +119,7 @@ class NagiosConfig(object):
         #print repr(search_dirs)
 
         for path in search_dirs:
+            self.logger.debug( "Searching for main configuration file in directory {0!r}.".format( path ) )
             if not ( os.path.exists(path) and os.path.isdir(path) ):
                 continue
             if path in used_dirs: continue