Example #1
0
  def __logRemoteQueryResponse( self, retVal, elapsedTime ):
    """
    Log the result of a query

    @type retVal: dictionary
    @param retVal: Return value of the query
    """
    if retVal[ 'OK' ]:
      argsString = "OK"
    else:
      argsString = "ERROR: %s" % retVal[ 'Message' ]
    gLogger.always( "Returning response", "%s (%.2f secs) %s" % ( self.srv_getFormattedRemoteCredentials(),
                                                                elapsedTime, argsString ) )
Example #2
0
  def __logRemoteQueryResponse( self, retVal, elapsedTime ):
    """
    Log the result of a query

    @type retVal: dictionary
    @param retVal: Return value of the query
    """
    if retVal[ 'OK' ]:
      argsString = "OK"
    else:
      argsString = "ERROR: %s" % retVal[ 'Message' ]
    gLogger.always( "Returning response", "%s (%.2f secs) %s" % ( self.srv_getFormattedRemoteCredentials(),
                                                                elapsedTime, argsString ) )
Example #3
0
  def __logRemoteQuery( self, method, args ):
    """
    Log the contents of a remote query

    @type method: string
    @param method: Method to log
    @type args: tuple
    @param args: Arguments of the method called
    """
    if gConfig.getValue( "%s/MaskRequestParams" % self.serviceInfoDict[ 'serviceSectionPath' ], "y" ).lower() in ( "y", "yes", "true" ):
      argsString = "<masked>"
    else:
      argsString = "\n\t%s\n" % ",\n\t".join( [ str( arg )[:50] for arg in args ] )
    gLogger.always( "Executing action", "%s %s(%s)" % ( self.srv_getFormattedRemoteCredentials(),
                                                      method,
                                                      argsString ) )
Example #4
0
  def __logRemoteQuery( self, method, args ):
    """
    Log the contents of a remote query

    @type method: string
    @param method: Method to log
    @type args: tuple
    @param args: Arguments of the method called
    """
    if gConfig.getValue( "%s/MaskRequestParams" % self.serviceInfoDict[ 'serviceSectionPath' ], "y" ).lower() in ( "y", "yes", "true" ):
      argsString = "<masked>"
    else:
      argsString = "\n\t%s\n" % ",\n\t".join( [ str( arg )[:50] for arg in args ] )
    gLogger.always( "Executing action", "%s %s(%s)" % ( self.srv_getFormattedRemoteCredentials(),
                                                      method,
                                                      argsString ) )