Falydoor / aws-cloudwatch-ansi-colors

Apache License 2.0
4 stars 4 forks source link

Little square close to string #2

Closed gerjunior closed 3 years ago

gerjunior commented 3 years ago

I see those little squares appearing close to the colored strings. They appear at the beginning and at the end of every colored line. square

I'm using nodeJS. I tested the colors of the following packages and the problem persists.

Here is an example of the code I get from those colorized strings:

"\u001b[90m{\u001b[39m\r  \u001b[36m\"timestamp\"\u001b[39m\u001b[31m:\u001b[39m \u001b[33m\"1970-01-19T12:08:38.400Z\"\u001b[39m\u001b[90m,\u001b[39m\r  \u001b[36m\"requestContext\"\u001b[39m\u001b[31m:\u001b[39m \u001b[90m{\u001b[39m\r    \u001b[36m\"authorizer\"\u001b[39m\u001b[31m:\u001b[39m \u001b[90m{\u001b[39m\r      \u001b[36m\"profileId\"\u001b[39m\u001b[31m:\u001b[39m \u001b[33m\"76169801-d7a6-4f03-bcb5-7f498187de17\"\u001b[39m\u001b[90m,\u001b[39m\r      \u001b[36m\"accountId\"\u001b[39m\u001b[31m:\u001b[39m \u001b[33m\"76169801-d7a6-4f03-bcb5-7f498187de17\"\u001b[39m\r    \u001b[90m}\u001b[39m\r  \u001b[90m}\u001b[39m\u001b[90m,\u001b[39m\r  \u001b[36m\"level\"\u001b[39m\u001b[31m:\u001b[39m \u001b[33m\"info\"\u001b[39m\u001b[90m,\u001b[39m\r  \u001b[36m\"message\"\u001b[39m\u001b[31m:\u001b[39m \u001b[33m\"Starting request\"\u001b[39m\r\u001b[90m}\u001b[39m"
Falydoor commented 3 years ago

Hello!

Looks like the logs are coming from a node.js app and I only tested with the logs of a Spring Boot app...

Is it possible to have the code of your app?

gerjunior commented 3 years ago

Hello!

Looks like the logs are coming from a node.js app and I only tested with the logs of a Spring Boot app...

Is it possible to have the code of your app?

Sadly I cannot provide more information than that about the code because it is in a private organization repo, but I think that the color codes I mentioned above may help you.

Falydoor commented 3 years ago

Thank you so much @Gerjunior for your PR!

I just published the new version 1.4 with your fix!