def __call__(self, message):
        """
        Fail-ignorant logging function.
        """
        if self.enabled:
            if self.destination is None:
                raise NotInstalled("Manhole is not installed!")
            try:
                full_message = "Manhole[%s:%.4f]: %s\n" % (os.getpid(), self.time(), message)

                if isinstance(self.destination, int):
                    os.write(self.destination, full_message.encode('ascii', 'ignore'))
                else:
                    self.destination.write(full_message)
            except Exception:
                pass
def __call__ ( self , message ) : if self . enabled : if self . destination is None : raise NotInstalled ( "Manhole is not installed!" ) try : full_message = "Manhole[%s:%.4f]: %s\n" % ( os . getpid ( ) , self . time ( ) , message ) if isinstance ( self . destination , int ) : os . write ( self . destination , full_message . encode ( 'ascii' , 'ignore' ) ) else : self . destination . write ( full_message ) except Exception : pass
Fail-ignorant logging function.