Skip to content

Support for debug outgoing request from sentry sdk #561

Closed Answered by stayallive
illambo asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @illambo, we have the option to attach a logger to the SDK.

We do this ourself in the php artisan sentry:test command:

// We set a logger so we can surface errors thrown internally by the SDK
$clientBuilder->setLogger(new class($this) extends AbstractLogger {
private $command;
public function __construct(TestCommand $command)
{
$this->command = $command;
}
public function log($level, $message, array $context = []): void
{
if ($level === 'error') {
$this->command->logMessageFromSDK($message);
}
}
});
.

Maybe ru…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
4 replies
@illambo
Comment options

@stayallive
Comment options

@illambo
Comment options

@stayallive
Comment options

Answer selected by illambo
Comment options

You must be logged in to vote
4 replies
@stayallive
Comment options

@illambo
Comment options

@illambo
Comment options

@stayallive
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants