From: <mik...@us...> - 2008-10-03 00:29:43
|
Revision: 1065 http://omc.svn.sourceforge.net/omc/?rev=1065&view=rev Author: mike-brasher Date: 2008-10-03 00:29:33 +0000 (Fri, 03 Oct 2008) Log Message: ----------- Works towards logging. Modified Paths: -------------- cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py cmpi-bindings/trunk/test/python/TestMethod.py Modified: cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py =================================================================== --- cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-10-02 18:45:12 UTC (rev 1064) +++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-10-03 00:29:33 UTC (rev 1065) @@ -359,17 +359,17 @@ class Logger(object): def __init__(self, broker): + #self.broker = ExceptionClassWrapper(broker) self.broker = broker + def log_error(self, msg): + self.broker.LogMessage(1, "ERROR", msg); + def log_info(self, msg): + self.broker.LogMessage(2, "INFO", msg); + def log_warn(self, msg): + self.broker.LogMessage(3, "WARN", msg); def log_debug(self, msg): - print msg - def log_info(self, msg): - pass - def log_error(self, msg): - pass - def log_fatal(self, msg): - pass + self.broker.LogMessage(4, "DEBUG", msg); - class ProviderEnvironment(object): def __init__(self, proxy, ctx): self.proxy = proxy Modified: cmpi-bindings/trunk/test/python/TestMethod.py =================================================================== --- cmpi-bindings/trunk/test/python/TestMethod.py 2008-10-02 18:45:12 UTC (rev 1064) +++ cmpi-bindings/trunk/test/python/TestMethod.py 2008-10-03 00:29:33 UTC (rev 1065) @@ -44,7 +44,7 @@ logger.log_debug('Entering %s.enum_instances()' \ % self.__class__.__name__) - #''' + ''' ch = env.get_cimom_handle() try: e = ch.EnumerateInstanceNames("root/cimv2", "TestAssoc_Userx") @@ -54,7 +54,7 @@ print "ABCDEFG" print e print "HIJKLMNOP" - #''' + ''' ''' ch = env.get_cimom_handle() @@ -65,7 +65,11 @@ print e ''' + l = env.get_logger() + l.log_debug("hello"); + #except CIMError, e: + for key in g_insts.keys(): model['id'] = key model.path['id'] = key This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |