Skip to content

[Messenger][SQS] Make sure one can enable debug logs #38998

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

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Nov 5, 2020

Q A
Branch? 5.x
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR symfony/symfony-docs#14533

If you add &debug=true on your DSN, then we will use LoggerInterface::debug() to print HTTP requests and responses.
This has a negative impact on performance, but it will be helpful when debugging.


Connection::fromDsn('sqs://default', ['bar' => 'bar']);
}

public function testFromDsnWithInvalidQueryStringAndOption()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Unknown option found: [bar]. Allowed options are [buffer_size, wait_time, poll_timeout, visibility_timeout, auto_setup, access_key, secret_key, endpoint, region, queue_name, account, sslmode].');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont want this test to fail every time we add a new option.

@@ -312,4 +315,83 @@ public function testGetQueueUrlNotCalled()

$connection->delete('id');
}

public function testLoggerWithoutDebugOption()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could replace these tests by just comparing objects of SqsClient and just see if they got the same config... that might be better and more "unit"

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need a CHANGELOG entry for this

@Nyholm
Copy link
Member Author

Nyholm commented Nov 5, 2020

I added change log for 5.3

@chalasr
Copy link
Member

chalasr commented Nov 11, 2020

Helpful! Thank you Tobias.

@Nyholm
Copy link
Member Author

Nyholm commented Nov 11, 2020

Thank you for merging.

@Nyholm Nyholm deleted the debug-sqs branch November 11, 2020 13:22
@fabpot fabpot mentioned this pull request Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants