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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for library instrumentation #713
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I just want to verify that you intend for the diagnostic entry to be after the first log and not before, since that's what the test looks like.
callback: () => void | ||
) => { | ||
assert.strictEqual(entry_, entry); | ||
assert.deepEqual(entry_[0], entry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the test entry be the first, or should the diagnostic entry come first? Or does it matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I changed the logic in LogCommon.log() to write array of entries instead a single object, this logic just adopted to perform validations on array of entries
Oh, I see - yep, seems I need later to make a fix in nodejs-logging to reverse an array. Good catch! |
This feature provides an ability to log extra entry with diagnostics structure which contains logging library information. Such entry is logged only once when first entry is written by a process using logging library.
Fixes #714 馃