Proposed solution for AFLplusplus#485
Currently all logging messages eventually resolve to the SAYF macro. The format-string lieral is constructed at compile-time with expanded color-codes or no color-codes based on USE_COLOR flag.
To achieve runtime control of color codes the idea is to use an env var (AFL_DECOLORIZE_CONSOLE_OUTPUT) to control output of color codes. When AFL was compiled with USE_COLOR, then it checks the presence and value of this variable and when it is set to 1, it strips the color-codes from the format strings.
Here's the outline of proposed solution: