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

Coloring of console output #5603

Closed
Telavian opened this issue Apr 23, 2019 · 7 comments
Closed

Coloring of console output #5603

Telavian opened this issue Apr 23, 2019 · 7 comments

Comments

@Telavian
Copy link

Currently Stdout/Stderr is displayed as plain text in the Nomad UI however depending on the application the text can be displayed with color.
Color of course makes certain things vastly easier to see.
This of course would be a low priority however it would be helpful in certain cases.

Using this file for testing the console prints several colors.
The raw file may need to be downloaded depending on how your browser displays things.
In addition that file is attached in a txt file format.

win10colors.txt

https://gist.github.com/mlocati/fdabcaeb8071d5c75a2d51712db24011

@preetapan
Copy link
Contributor

@Telavian is this windows specific?

@Telavian
Copy link
Author

Telavian commented Apr 24, 2019 via email

@preetapan
Copy link
Contributor

Nevermind, I thought this was about the CLI, now I see that its the UI that you were talking about.

@Telavian
Copy link
Author

Telavian commented Apr 24, 2019 via email

@DingoEatingFuzz
Copy link
Contributor

Hey @Telavian, @notnoop and I did some digging into this and learned that Nomad does send ansi color codes in the API when present, but the UI wasn't doing anything to render them.

Independently, @Mongey opened a PR to add support for rendering ansi-coded log output as HTML in the UI.

So if you test against master, you should be able to get colored logs in the UI now with one caveat: if you weren't previously seeing the ansi color coding characters in the log, then you will not see colors now. This means that your application is not logging colored output for one reason or another. The easiest way to tell if the way you have packaged and run your application is suppressing colored logs is by using the nomad alloc logs command.

Please feel free to reopen this issue if you think there is something deeper or windows-specific going on here.

@Telavian
Copy link
Author

Telavian commented May 6, 2019 via email

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants