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

ANSI Color not being output via CLI #505

Open
brumi-w opened this issue Apr 26, 2023 · 1 comment
Open

ANSI Color not being output via CLI #505

brumi-w opened this issue Apr 26, 2023 · 1 comment

Comments

@brumi-w
Copy link

brumi-w commented Apr 26, 2023

Hi,
In the rundeck UI logs output, color is parsed and displayed. It is also present in the execution's .rdlog. Example:

^2023-04-26T14:56:50Z|||{node=MYNODE|step=4|stepctx=4|user=root}|^[[0;33mANSIBLE_NODE^[[0m : ^[[0;32mok=110 ^[[0m ^[[0;33mchanged=13  ^[[0m unreachable=0    failed=0    ^[[0;36mskipped=216 ^[[0m rescued=0    ignored=0   ^

Color gets rendered when tailing the log file
image

When viewing the execution log via the rundeck CLI rd executions follow --eid=12345, no colors are displayed. When piping the output to a file, there is only text and no escaped ANSI colors. I have export RD_COLOR=1 in my ~/.rd/rd.conf file to attempt to force it but no luck. Does the CLI support sending over the escaped ANSI color of the execution logs? or just the text?
Thanks

@gschueler
Copy link
Member

the API currently returns log entries with stripped ansi colorization codes. I will send an enhancement to enable the original log entries to be returned via the API. Until that is available, the CLI will not be able to show the ansi colorized output.

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