Skip to content

Clean up reconnect logs#843

Merged
mtmk merged 4 commits into
mainfrom
reconnect-log-clean-up
May 2, 2025
Merged

Clean up reconnect logs#843
mtmk merged 4 commits into
mainfrom
reconnect-log-clean-up

Conversation

@mtmk

@mtmk mtmk commented May 1, 2025

Copy link
Copy Markdown
Member

No description provided.

@mtmk
mtmk requested review from caleblloyd and scottf May 1, 2025 08:43
// is either an early return or stays in the loop
try
{
_logger.LogError(NatsLogEvents.Connection, "Retry loop stopped and connection state is invalid [{ReconnectCount}]", reconnectCount);

@mtmk mtmk May 1, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is logged on a clean reconnect which isn't an error case

try
{
_logger.LogError(NatsLogEvents.Connection, "Retry loop stopped and connection state is invalid [{ReconnectCount}]", reconnectCount);
_logger.LogDebug(NatsLogEvents.Connection, "Reconnect loop stopped [{ReconnectCount}]", reconnectCount);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

helpful for debugging reconnect issues

@scottf scottf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mtmk
mtmk merged commit 1633e06 into main May 2, 2025
@mtmk
mtmk deleted the reconnect-log-clean-up branch May 2, 2025 11:33
mtmk added a commit that referenced this pull request May 13, 2025
* Fix reconnect socket behavior (#844)
* Fix consume 503 handling (#849)
* NatsMsg add create method (#632) (#798)
* Clean up reconnect logs (#843)
* Fix subscriptions dispose exception handling (#845)
@mtmk mtmk mentioned this pull request May 13, 2025
mtmk added a commit that referenced this pull request May 13, 2025
* Fix reconnect socket behavior (#844)
* Fix consume 503 handling (#849)
* NatsMsg add create method (#632) (#798)
* Clean up reconnect logs (#843)
* Fix subscriptions dispose exception handling (#845)
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

Successfully merging this pull request may close these issues.

2 participants