-
Notifications
You must be signed in to change notification settings - Fork 229
fix(logger): replace PassThrough with Writable for log handling COMPASS-9736 #7222
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
base: main
Are you sure you want to change the base?
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.
Pull Request Overview
Refactors the logger implementation to replace PassThrough stream with a custom Writable stream object for better control over log handling in the CompassWebLogger class.
- Replaces PassThrough stream with a custom Writable-like object that directly handles write and end operations
- Simplifies the logging pipeline by removing intermediate stream handling
- Maintains the same callback functionality for log processing
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
}); | ||
const target = { | ||
write(line: string, callback: () => void) { | ||
callbackRef.current.onLog?.(JSON.parse(line)); |
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.
Do we want to update the test ensure it's happening synchronously?
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.
Added one!
33c13ae
to
533f97a
Compare
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes