The Salesforce CLI provides the option to stream logs directly from the command line. To tail the logs, you can execute the following command in the command-line window:
sfdx force:apex:log:tail -c
You can also filter the result set from the logs using the GREP Unix command. Let's say you want to only see the USER_DEBUG results, then the command to the filter will be as follows:
sfdx force:apex:log:tail --color | grep USER_DEBUG
In our case, we can add system.debug to the response from the HTTP call and execute the application to stream logs on the CLI. The following screenshot shows the logs captured from the tail command:
Also, note the Visual Studio code editor extension for sfdx can capture these logs, and you can open them in your IDE. The following screenshot shows how you can retrieve the logs:
You will see the logs in the sfdx/tools/debug/logs/ folder.