Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug - Add DISCOVERY_SHOW_PROGRESS=true - Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
@@ -12,13 +12,14 @@ final class MiddlewareConnection implements ConnectionInterface
|
||||
public function __construct(
|
||||
private ConnectionInterface $baseConnection,
|
||||
private MiddlewarePipeline $pipeline
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function execute(string $sql, array $parameters = []): int
|
||||
{
|
||||
$context = new QueryContext('execute', $sql, $parameters, $this->baseConnection);
|
||||
|
||||
return $this->pipeline->process($context, function(QueryContext $ctx): int {
|
||||
return $this->pipeline->process($context, function (QueryContext $ctx): int {
|
||||
return $ctx->connection->execute($ctx->sql, $ctx->parameters);
|
||||
});
|
||||
}
|
||||
@@ -27,7 +28,7 @@ final class MiddlewareConnection implements ConnectionInterface
|
||||
{
|
||||
$context = new QueryContext('query', $sql, $parameters, $this->baseConnection);
|
||||
|
||||
return $this->pipeline->process($context, function(QueryContext $ctx): ResultInterface {
|
||||
return $this->pipeline->process($context, function (QueryContext $ctx): ResultInterface {
|
||||
return $ctx->connection->query($ctx->sql, $ctx->parameters);
|
||||
});
|
||||
}
|
||||
@@ -36,7 +37,7 @@ final class MiddlewareConnection implements ConnectionInterface
|
||||
{
|
||||
$context = new QueryContext('queryOne', $sql, $parameters, $this->baseConnection);
|
||||
|
||||
return $this->pipeline->process($context, function(QueryContext $ctx): ?array {
|
||||
return $this->pipeline->process($context, function (QueryContext $ctx): ?array {
|
||||
return $ctx->connection->queryOne($ctx->sql, $ctx->parameters);
|
||||
});
|
||||
}
|
||||
@@ -45,7 +46,7 @@ final class MiddlewareConnection implements ConnectionInterface
|
||||
{
|
||||
$context = new QueryContext('queryColumn', $sql, $parameters, $this->baseConnection);
|
||||
|
||||
return $this->pipeline->process($context, function(QueryContext $ctx): array {
|
||||
return $this->pipeline->process($context, function (QueryContext $ctx): array {
|
||||
return $ctx->connection->queryColumn($ctx->sql, $ctx->parameters);
|
||||
});
|
||||
}
|
||||
@@ -54,7 +55,7 @@ final class MiddlewareConnection implements ConnectionInterface
|
||||
{
|
||||
$context = new QueryContext('queryScalar', $sql, $parameters, $this->baseConnection);
|
||||
|
||||
return $this->pipeline->process($context, function(QueryContext $ctx): mixed {
|
||||
return $this->pipeline->process($context, function (QueryContext $ctx): mixed {
|
||||
return $ctx->connection->queryScalar($ctx->sql, $ctx->parameters);
|
||||
});
|
||||
}
|
||||
@@ -63,7 +64,7 @@ final class MiddlewareConnection implements ConnectionInterface
|
||||
{
|
||||
$context = new QueryContext('beginTransaction', '', [], $this->baseConnection);
|
||||
|
||||
$this->pipeline->process($context, function(QueryContext $ctx): void {
|
||||
$this->pipeline->process($context, function (QueryContext $ctx): void {
|
||||
$ctx->connection->beginTransaction();
|
||||
});
|
||||
}
|
||||
@@ -72,7 +73,7 @@ final class MiddlewareConnection implements ConnectionInterface
|
||||
{
|
||||
$context = new QueryContext('commit', '', [], $this->baseConnection);
|
||||
|
||||
$this->pipeline->process($context, function(QueryContext $ctx): void {
|
||||
$this->pipeline->process($context, function (QueryContext $ctx): void {
|
||||
$ctx->connection->commit();
|
||||
});
|
||||
}
|
||||
@@ -81,7 +82,7 @@ final class MiddlewareConnection implements ConnectionInterface
|
||||
{
|
||||
$context = new QueryContext('rollback', '', [], $this->baseConnection);
|
||||
|
||||
$this->pipeline->process($context, function(QueryContext $ctx): void {
|
||||
$this->pipeline->process($context, function (QueryContext $ctx): void {
|
||||
$ctx->connection->rollback();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user