Skip to content

Commit

Permalink
Log response from Buddy to the Manticore in Debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
donhardman committed Jan 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 1a91919 commit 5910a9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Network/EventHandler.php
Original file line number Diff line number Diff line change
@@ -63,7 +63,8 @@ public static function request(SwooleRequest $request, SwooleResponse $response)
$requestId = $request->header['Request-ID'] ?? uniqid(more_entropy: true);
$body = $request->rawContent() ?: '';
Buddy::debug("[$requestId] request data: $body");
$result = static::process($requestId, $body);
$result = (string)static::process($requestId, $body);
Buddy::debug("[$requestId] response data: $result");
// Send response
$response->header('Content-Type', 'application/json');
$response->status(200);

0 comments on commit 5910a9f

Please sign in to comment.