If we left the ansi color codes in apache logs, we can run a sed
script to convert the escaped escapes back to ansi escapes which make
the logs colorized again.
There are 8 \ because we need to end up with 2 in the final sed, and
we get interopolated twice. How much fun is escape interpolation? All
the fun.
Change-Id: Id8531cf03ba80f0df62f20add02e757bd63d4f2d
| ... | ... |
@@ -1686,7 +1686,7 @@ function tail_log {
|
| 1686 | 1686 |
local logfile=$2 |
| 1687 | 1687 |
|
| 1688 | 1688 |
if [[ "$USE_SCREEN" = "True" ]]; then |
| 1689 |
- screen_process "$name" "sudo tail -f $logfile" |
|
| 1689 |
+ screen_process "$name" "sudo tail -f $logfile | sed 's/\\\\\\\\x1b/\o033/g'" |
|
| 1690 | 1690 |
fi |
| 1691 | 1691 |
} |
| 1692 | 1692 |
|