Skip to content

ANSI Color not being output via CLI #505

@brumi-w

Description

@brumi-w

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions