-
Notifications
You must be signed in to change notification settings - Fork 17
[ACI-4111] Add a log interceptor #283
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
Conversation
Singles out [Bitrise ...] logs from the rest and forwards them to stdout
SummaryThis PR adds a log interceptor that filters and routes log output based on regex patterns. It introduces a new PrefixInterceptor that can intercept writes matching a specific prefix pattern and forward them to multiple outputs. The implementation includes proper goroutine management and pipe-based communication for handling concurrent log processing. Walkthrough
|
bitrise-ip-bot
left a comment
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.
This is an AI-generated review. Please review it carefully.
Actionable comments posted: 2
bitrise-ip-bot
left a comment
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.
This is an AI-generated review. Please review it carefully.
Actionable comments posted: 1
bitrise-ip-bot
left a comment
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.
This is an AI-generated review. Please review it carefully.
Actionable comments posted: 3
Co-authored-by: bitrise-ip-bot <95076763+bitrise-ip-bot@users.noreply.github.com>
bitrise-ip-bot
left a comment
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.
This is an AI-generated review. Please review it carefully.
Actionable comments posted: 2
Co-authored-by: bitrise-ip-bot <95076763+bitrise-ip-bot@users.noreply.github.com>
bitrise-ip-bot
left a comment
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.
This is an AI-generated review. Please review it carefully.
Actionable comments posted: 3
bitrise-ip-bot
left a comment
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.
This is an AI-generated review. Please review it carefully.
Actionable comments posted: 1
xcpretty/xcpretty.go
Outdated
| interceptor := loginterceptor.NewPrefixInterceptor(re, os.Stdout, outWriter) | ||
| defer func() { | ||
| if err := interceptor.Close(); err != nil { | ||
| loggerV1.Warnf("Failed to close log interceptor, error: %s", err) |
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.
If we're using the go-utils log, can we use the same in the interceptor too?
bitrise-ip-bot
left a comment
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.
This is an AI-generated review. Please review it carefully.
Actionable comments posted: 1
bitrise-ip-bot
left a comment
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.
This is an AI-generated review. Please review it carefully.
Actionable comments posted: 1
Singles out [Bitrise ...] logs from the rest and forwards them to stdout