JoshuaJWilborn / colorize-the-logs

Browser extension to add color back into AWS CodeBuild logs after it gets stripped out.
MIT License
10 stars 2 forks source link

No colors for ruby project #12

Open dlozano opened 4 years ago

dlozano commented 4 years ago

I don't know if the initial text reset (\033[0m) is not supported by the regex substitutions but I don't see colors at all.

Here the original and colorized outputs:

<tr class="dx-Highlighter__line">
  <td class="ace_gutter"><span class="dx-Highlighter__handle">304</span></td>
  <td class="ace_line ๐ŸŒˆ">
    <span class="ace_invisible ace_invisible_space ace_invalid">ยท</span>
    [0m
    <span class="ace_invisible ace_invisible_space ace_invalid">ยท</span>
    [91mI, [2020-04-24T22:05:41.076523 #1]  INFO -- : Writing /usr/src/app/public/assets/user-icon-d266673e32e96971b08d533489a2b77d.png
  </td>
</tr>
<tr class="dx-Highlighter__line">
  <td class="ace_gutter">
    <span class="dx-Highlighter__handle">304</span></td>
  <td class="ace_line ๐ŸŒˆ">
    [0m[91mI, [2020-04-24T22:05:41.076523 #1]  INFO -- : Writing /usr/src/app/public/assets/user-icon-d266673e32e96971b08d533489a2b77d.png
  </td>
</tr>
JoshuaJWilborn commented 4 years ago

Thanks for submitting this ticket, I will review it sometime this week.

JoshuaJWilborn commented 4 years ago

Would you happen to have a screenshot of what you would expect it to look like, perhaps when you run it in your terminal?

dlozano commented 4 years ago

Screenshots from a plain docker-compose: docker-compose-build

And with codebuild in local via https://github.com/aws/aws-codebuild-docker-images codebuild-local

dlozano commented 4 years ago

The first screenshot was from docker build, not docker compose. Here the escape sequences:

@2020-04-27 00:49:32 ~/workspace/aaa feature/codebuild-report $cat -A docker-build.log | grep assets/user*
^[[0m^[[91mI, [2020-04-26T22:48:34.461702 #1]  INFO -- : Writing /usr/src/app/public/assets/user-icon-d266673e32e96971b08d533489a2b77d.png$
^[[0m^[[91mI, [2020-04-26T22:48:34.462193 #1]  INFO -- : Writing /usr/src/app/public/assets/user-menu-arrow-2cca565823387ff7a0b493599f85c59c.png$
JoshuaJWilborn commented 3 years ago

Hello @dlozano could you please see if it's working in most recent version for you? I've released a fix for a change that was made on AWS side, and I need to know if it fixes this bug or not.