Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve response logging #23

Open
cladelpino opened this issue Mar 5, 2021 · 0 comments
Open

Improve response logging #23

cladelpino opened this issue Mar 5, 2021 · 0 comments

Comments

@cladelpino
Copy link

cladelpino commented Mar 5, 2021

The relevant part of locallib.php which sets the string to be logged in the response_answer event is:

$status = 'Error sending request';
if (!empty($response['HTTP/1.1'])) {
$status = $response['HTTP/1.1'];
}

This leads, for instance, when response is 'HTTP/2' that the log gets written "Error sending request" and nothing else.

I'd suggest something like:

$status = json_encode($response);

to get more information logged, or at least also check for the HTTP/2 field of the response.

@cladelpino cladelpino changed the title Log complete response Improve response logging Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant