-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jsonrpc: Write request and response object into a log file and stderr
Print JSON RPC request and response objects into a specified log file and stderr via spdk_flog() and spdk_log(). To enable these logging, add two public APIs, spdk_jsonrpc_set_log_level() and spdk_jsonrpc_set_log_file(). Remove newlines of JSON objects to print it in a single line. We do this by default because newline does not affect the functionality of JSON RPC. Another idea is to pass file name and file mode (append, write, ...). However, SPDK is library. The application should manage log file. Hence, we receive file pointer. Signed-off-by: Shuhei Matsumoto <[email protected]> Change-Id: Ia385181f3922077670767d72bd070391dad75b1d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18829 Reviewed-by: Jim Harris <[email protected]> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <[email protected]> Reviewed-by: Konrad Sztyber <[email protected]>
- Loading branch information
1 parent
ca59dd5
commit a4009e7
Showing
5 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters