Skip to content
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

fix: update error logging #1035

Merged
merged 2 commits into from
Sep 24, 2021
Merged

Conversation

BertKleewein
Copy link
Member

These are changes I needed to make to debug my current ICM. Mostly this changes debug logging that says "error is [object Object]" to something more meaningful.

@@ -315,7 +316,7 @@ export class SenderLink extends EventEmitter implements AmqpLink {
this._indicatedError = undefined;
this._senderCloseOccurred = true;
if (error) {
debugErrors(this.toString() + ': In sender attached state - close event for ' + context.sender.name + ' already indicated error is: ' + this._getErrorName(error));
debugErrors(this.toString() + ': In sender attached state - close event for ' + context.sender.name + ' already indicated error is: ' + getErrorName(error));
Copy link
Member

Choose a reason for hiding this comment

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

very minor nit: Template literals would be more readable and slightly shorter than concatenating strings, i.e.,

Suggested change
debugErrors(this.toString() + ': In sender attached state - close event for ' + context.sender.name + ' already indicated error is: ' + getErrorName(error));
debugErrors(`${this.toString()}: In sender attached state - close event for ${context.sender.name} already indicated error is: ${getErrorName(error)}`);

@BertKleewein BertKleewein merged commit ae71c72 into Azure:master Sep 24, 2021
@BertKleewein BertKleewein deleted the more-debug-logging branch September 24, 2021 03:32
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