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

Provide way to replace strings in logs #3022

Open
IanButterworth opened this issue Oct 2, 2024 · 1 comment
Open

Provide way to replace strings in logs #3022

IanButterworth opened this issue Oct 2, 2024 · 1 comment

Comments

@IanButterworth
Copy link

Is your feature request related to a problem? Please describe.
A buildkite setup I use has a very long (175 chars) sandboxed path to the build directory, which is printed ~1800 times throughout the build and tests. It makes it hard to quickly parse logs because of wrapping, and that the key relevant detail is a small fraction of the text output.

The paths from within this path are printed from various tools and code paths, and would thus be difficult to tokenize the path at the point of print.

Describe the solution you'd like
A way to replace strings in the log that is displayed in buildkite

Replacing the following strings:
/some/really/long/path/to/my_repo => [my_repo]
...
[my_repo]/contrib/main.sh 733
...

Perhaps raw logs could maintain the original strings?

Describe alternatives you've considered

Additional context

@DrJosh9000
Copy link
Contributor

Thanks for the feature request @IanButterworth! The string replacer (used for the secret redactor) could probably be reused for this in quite a straightforward way.

Would you be opening a PR? We would be happy to work with you to get it implemented!

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

No branches or pull requests

2 participants