Disable color injected by Spacelift logger
I would like to be able to disable the color output in the Spacelift logs. I’ve already modified the tool commands to inject -no-color or —terragrunt-no-color, but the spacelift runner is still injecting color in its own log messages.
[0;36m[01JKRCTRGDKMYA668V6YEXK3R6] [0mSuccessfully planned changes
[0;36m[01JKRCTRGDKMYA668V6YEXK3R6] [0mRetrieving the dependency graph...This is irritating, because when I download the logs, the color codes clutter up the messages. I would like to just disable all color in the output.
- Workaround
- No
Log in to comment and vote
Comments3
Jonah Kowall
Jul 12
Thanks for the suggestion. There’s no setting today to disable the color codes Spacelift adds to its own log lines, and this hasn’t gathered enough interest for us to prioritize it, so I’m closing it. For the tool output itself you can pass TF_CLI_ARGS=-no-color (or the equivalent for your vendor) as a stack environment variable. If you’re consuming logs programmatically and the ANSI codes are breaking something specific, comment with the pipeline details and we’ll revisit.
Black Breeze
May 10, 2025
Hey! Can you help us understand the job you’re trying to do here? We inject ANSI color codes into logs for consistency—since tools like Terraform output color by default, we normalize it so things don’t look half-styled or broken.
Are you trying to parse logs, grep them, store them in a plain-text system, or something else? If we better understand your end goal, we might be able to suggest a cleaner path—or understand whether disabling color is the right solution.
Appreciate the nudge either way!
Yellow Mirror
May 10, 2025
>This is irritating, because when I download the logs, the color codes clutter up the messages. I would like to just disable all color in the output.
Many of the logs are rather long, especially when using terragrunt run-all configurations, or somewhat largeish tfstates. The Spacelift UI only displays a limited portion of the log, so many times I must download the log to read it.
I don’t find that the colored logs really help me all that much in the UI, so I’d prefer to just turn off all color.
However, a couple other enhancements could help:
Display the entirety of the log in the UI for scroll back
Remove ANSI color codes when downloading the log