Adding colored text output to iocsh output
The IOC shell application displays a lot of information very densly. When reading through this output, it is frequently difficult to find the information you are looking for quickly. This is especially noticeable when an error occurs during configuration/
An environment variable such as "EPICS_USE_COLOR" could switch on and off the color output. On unix systems, ANSI escape codes can be sent to the terminal to switch text color and on Windows the core Windows library provides support. The POSIX function 'isatty' (or on windows '_isatty') would make sure it is only outputting color to a terminal, so that output redirection would not result in a file containing all the escape commands.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Whiteboard
The linked branch contains a working version of the idea for Linux soft IOC's. However, it goes a step further and allows for custom colors to be set by the startup script like so:
epicsEnvSet("RED", "2");
epicsEnvSet(
epicsEnvSet("BLUE", "5");
epicsEnvSet(
epicsEnvSet(
epicsEnvSet(
epicsEnvSet(
epicsEnvSet(