-
Notifications
You must be signed in to change notification settings - Fork 8
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
libherokubuildpack: Pack output eats log
colors
#555
Comments
This is something that should be fixed/improved (either here or upstream), but as a workaround in the meantime, update to latest pack CLI, since it trusts the |
log
colors
Note: The |
Fix colour resetting for the `log_*` macros This fixes some long-standing ANSI colour bugs with the `log_header`, `log_error` and `log_warning` macros. Whilst we soon want to move away to more advanced logging libraries that use the new logging style, there are still many buildpacks using these macros which will benefit short term from these fixes (Procfile, Go, Node.js, JVM, Python, PHP, buildpacks-release-phase, buildpacks-frontend-web). The logging macros would previously emit output roughly like: ``` <colour> [Error: Foo] <reset><colour>Message line one. Message line two. ``` This was not only missing the final `<reset>`, but also didn't wrap each line individually with colour codes/resets. This causes issues when lines end up prefixed - such as the Git `remote:` prefix, or when using Pack CLI locally with an untrusted build (which adds the colourised `[builder]` prefixes) or `--timestamps` mode. For example in this: ``` remote: <colour> remote: [Error: Foo] remote: <reset><colour>Message line one. remote: Message line two. ``` ...several of the `remote:`s would inherit the colours. Instead what we need is: ``` remote: remote: <colour>[Error: Foo]<reset> remote: <colour>Message line one.<reset> remote: <colour>Message line two.<reset> ``` Fixes #555. Closes #844.
This fixes some long-standing ANSI colour bugs with the `log_header`, `log_error` and `log_warning` macros. Whilst we soon want to move away to more advanced logging libraries that use the new logging style, there are still many buildpacks using these macros which will benefit short term from these fixes (Procfile, Go, Node.js, JVM, Python, PHP, buildpacks-release-phase, buildpacks-frontend-web). The logging macros would previously emit output roughly like: ``` <colour> [Error: Foo] <reset><colour>Message line one. Message line two. ``` This was not only missing the final `<reset>`, but also didn't wrap each line individually with colour codes/resets. This causes issues when lines end up prefixed - such as the Git `remote:` prefix, or when using Pack CLI locally with an untrusted build (which adds the colourised `[builder]` prefixes) or `--timestamps` mode. For example in this: ``` remote: <colour> remote: [Error: Foo] remote: <reset><colour>Message line one. remote: Message line two. ``` ...several of the `remote:`s would inherit the colours. Instead what we need is: ``` remote: remote: <colour>[Error: Foo]<reset> remote: <colour>Message line one.<reset> remote: <colour>Message line two.<reset> ``` Fixes #555. Closes #844.
This fixes some long-standing ANSI colour bugs with the `log_header`, `log_error` and `log_warning` macros. Whilst we soon want to move away to more advanced logging libraries that use the new logging style, there are still many buildpacks using these macros which will benefit short term from these fixes (Procfile, Go, Node.js, JVM, Python, PHP, buildpacks-release-phase, buildpacks-frontend-web). The logging macros would previously emit output roughly like: ``` <colour> [Error: Foo] <reset><colour>Message line one. Message line two. ``` This was not only missing the final `<reset>`, but also didn't wrap each line individually with colour codes/resets. This causes issues when lines end up prefixed - such as the Git `remote:` prefix, or when using Pack CLI locally with an untrusted build (which adds the colourised `[builder]` prefixes) or `--timestamps` mode. For example in this: ``` remote: <colour> remote: [Error: Foo] remote: <reset><colour>Message line one. remote: Message line two. ``` ...several of the `remote:`s would inherit the colours. Instead what we need is: ``` remote: remote: <colour>[Error: Foo]<reset> remote: <colour>Message line one.<reset> remote: <colour>Message line two.<reset> ``` Fixes #555. Closes #844.
This fixes some long-standing ANSI colour bugs with the `log_header`, `log_error` and `log_warning` macros. Whilst we soon want to move away to more advanced logging libraries that use the new logging style, there are still many buildpacks using these macros which will benefit short term from these fixes (Procfile, Go, Node.js, JVM, Python, PHP, buildpacks-release-phase, buildpacks-frontend-web). The logging macros would previously emit output roughly like: ``` <colour> [Error: Foo] <reset><colour>Message line one. Message line two. ``` This was not only missing the final `<reset>`, but also didn't wrap each line individually with colour codes/resets. This causes issues when lines end up prefixed - such as the Git `remote:` prefix, or when using Pack CLI locally with an untrusted build (which adds the colourised `[builder]` prefixes) or `--timestamps` mode. For example in this: ``` remote: <colour> remote: [Error: Foo] remote: <reset><colour>Message line one. remote: Message line two. ``` ...several of the `remote:`s would inherit the colours. Instead what we need is: ``` remote: remote: <colour>[Error: Foo]<reset> remote: <colour>Message line one.<reset> remote: <colour>Message line two.<reset> ``` Fixes #555. Closes #844. GUS-W-17400078.
This fixes some long-standing ANSI colour bugs with the `log_header`, `log_error` and `log_warning` macros. Whilst we soon want to move away to more advanced logging libraries that use the new logging style, there are still many buildpacks using these macros which will benefit short term from these fixes (Procfile, Go, Node.js, JVM, Python, PHP, buildpacks-release-phase, buildpacks-frontend-web). The logging macros would previously emit output roughly like: ``` <colour> [Error: Foo] <reset><colour>Message line one. Message line two. ``` This was not only missing the final `<reset>`, but also didn't wrap each line individually with colour codes/resets. This causes issues when lines end up prefixed - such as the Git `remote:` prefix, or when using Pack CLI locally with an untrusted build (which adds the colourised `[builder]` prefixes) or `--timestamps` mode. For example in this: ``` remote: <colour> remote: [Error: Foo] remote: <reset><colour>Message line one. remote: Message line two. ``` ...several of the `remote:`s would inherit the colours. Instead what we need is: ``` remote: remote: <colour>[Error: Foo]<reset> remote: <colour>Message line one.<reset> remote: <colour>Message line two.<reset> ``` Fixes #555. Closes #844. GUS-W-17400078.
Running this command:
We should see header colors, but they're eaten by pack. Screenshot:
Notice that the color of
[builder]
right next to[Installing Ruby]
is different. I think what's happening is the color code is somehow being sent before[builder]
and it sets it's own color, and then clears it. We get no color because of the clear.I'm not sure if this is something we can fix here or need to go upstream with a bug report.
The text was updated successfully, but these errors were encountered: