How to use the jsonrpcclient.log.log_ function in jsonrpcclient

To help you get started, we’ve selected a few jsonrpcclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bcb / jsonrpcclient / jsonrpcclient / client.py View on Github external
def log_response(
        self, response: Response, trim_log_values: bool = False, **kwargs: Any
    ) -> None:
        """
        Log a response.

        Note this is different to log_request, in that it takes a Response object, not a
        string.

        Args:
            response: The Response object to log. Note this is different to log_request
                which takes a string.
            trim_log_values: Log an abbreviated version of the response.
        """
        return log_(response.text, response_log, "info", trim=trim_log_values, **kwargs)
github bcb / jsonrpcclient / jsonrpcclient / client.py View on Github external
def log_request(
        self, request: str, trim_log_values: bool = False, **kwargs: Any
    ) -> None:
        """
        Log a request.

        Args:
            request: The JSON-RPC request string.
            trim_log_values: Log an abbreviated version of the request.
        """
        return log_(request, request_log, "info", trim=trim_log_values, **kwargs)