Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No colours but escape chars in case of HTTP tracing #135

Open
mdeknowis opened this issue Jun 22, 2018 · 3 comments
Open

No colours but escape chars in case of HTTP tracing #135

mdeknowis opened this issue Jun 22, 2018 · 3 comments

Comments

@mdeknowis
Copy link

Hello,

we are creating our own bx plugin. We use the Http logging according
https://github.com/IBM-Cloud/ibm-cloud-cli-sdk/blob/master/docs/plugin_developer_guide.md#41-http-tracing

But we realized, that instead of colors, we see escaped control bytes.
The normal logging coloring is working (Warn, Fatal...)

---- SNIP ---
Retrieving...

[1;39mREQUEST:[0m [2018-06-21T13:51:50+02:00]
POST /auth/realms/integration/protocol/openid-connect/token HTTP/1.1
Host: myhost.net
Content-Type: application/x-www-form-urlencoded

...

[1;39mRESPONSE:[0m [2018-06-21T13:51:51+02:00] [1;39mElapsed:[0m 416ms
HTTP/1.1 200 OK
Content-Length: 2501
...

[1;39mREQUEST:[0m [2018-06-21T13:51:51+02:00]
POST /api/r HTTP/1.1
...

[1;39mRESPONSE:[0m [2018-06-21T13:51:51+02:00] [1;39mElapsed:[0m 64ms
HTTP/1.1 401
...
--- SNAP ---

Regards,
Michael

@weieigao
Copy link
Contributor

What's your platform? Was the plugin running on a real terminal?

@mdeknowis
Copy link
Author

Hello,

I was running it in Windows Shell (cmd). Funny, it's working now:
grafik

But instead of the control characters, there are just no colors. I don't know, if this is by purpose.

In general colors are working:
grafik

Please close this, if no colors should appear.

@weieigao
Copy link
Contributor

@mdeknowis no, it's not by purpose... We will check the code, thanks for reporting the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants