From: Frank Brehm Date: Tue, 14 Dec 2010 23:16:27 +0000 (+0000) Subject: Weitergekommen X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=d4db3411d0e4d040efcb3319083a723df7aef794;p=my-stuff%2Fnagios.git Weitergekommen git-svn-id: http://svn.brehm-online.com/svn/my-stuff/nagios/trunk@158 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa --- diff --git a/bin/nagios/config.py b/bin/nagios/config.py index 934dbc6..0084620 100644 --- a/bin/nagios/config.py +++ b/bin/nagios/config.py @@ -355,7 +355,9 @@ class NagiosConfig(LoggingObject): file = object['use'][1] row_num = object['use'][2] + pp = pprint.PrettyPrinter( indent = 4, depth = 6, width = 120 ) if 'templates' in object: + self.logger.debug( "Templates allready found, returning:\n\t{0}".format( pp.pformat( object['templates'] ) ) ) return object['templates'] object['templates'] = [] @@ -370,12 +372,14 @@ class NagiosConfig(LoggingObject): for name in self._retrieve_templates( object_type, template_name ): names.append( name ) for name in names: + self.logger.debug( "Assigning template {0!r}.".format( name ) ) if name in object['templates_applied']: self.logger.debug( "Template {0!r} for {1!r} allready applied.".format( name, object_type ) ) else: object['templates'].append( name ) object['templates_applied'].add( name ) - + + self.logger.debug( "Templates returning:\n\t{0}".format( pp.pformat( object['templates'] ) ) ) return object['templates'] #------------------------------------------------------