avoid as much as possible accessing logger through class instances, whenever that...
[sfa.git] / sfa / methods / Status.py
index dd15f5d..577d1b7 100644 (file)
@@ -1,5 +1,6 @@
 from sfa.util.xrn import urn_to_hrn
 from sfa.util.method import Method
+from sfa.util.sfalogging import logger
 
 from sfa.storage.parameter import Parameter, Mixed
 
@@ -20,10 +21,11 @@ class Status(Method):
     returns = Parameter(dict, "Status details")
 
     def call(self, xrns, creds, options):
-        valid_creds = self.api.auth.checkCredentialsSpeaksFor(creds, 'sliverstatus', xrns,
-                                                              check_sliver_callback=self.api.driver.check_sliver_credentials,
-                                                              options=options)
+        valid_creds = self.api.auth.checkCredentialsSpeaksFor(
+            creds, 'sliverstatus', xrns,
+            check_sliver_callback=self.api.driver.check_sliver_credentials,
+            options=options)
 
-        self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s" %
-                             (self.api.interface, xrns, self.name))
+        logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s" %
+                    (self.api.interface, xrns, self.name))
         return self.api.manager.Status(self.api, xrns, creds, options)