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

Disable colors on SBT build output #6

Closed
lstoll opened this issue Apr 2, 2012 · 2 comments
Closed

Disable colors on SBT build output #6

lstoll opened this issue Apr 2, 2012 · 2 comments

Comments

@lstoll
Copy link
Contributor

lstoll commented Apr 2, 2012

request received via @jroper

SBT likes to output stuff with formatted colours, and Play 2.0, which now uses SBT (note play 2 and play 1 use completely different build frameworks, when deploying a play 2 app to cedar it is detected and built as a Scala app, not a play app) makes extensive use of this feature. This is nice, except when deploying, which is very often done from automated scripts, eg from Jenkins or some other CI server, or from other automated scripts, not directly from a console. It's often necessary to work with the logs in something that isn't a console, for example, in Jenkins you view the logs on a webpage, or you might be reading the logs in an editor. If you try to do this, what you get is output that looks something like this:

� Imagine stuff with ansi colour codes on it, because github kills it.

So in these cases it is necessary to turn the colours off. This is very simple to do, just pass the following argument to SBT:

-Dsbt.log.noformat=true

Thoughts? It sounds like a sensible default, being the output is piped through git.

@lstoll
Copy link
Contributor Author

lstoll commented Apr 2, 2012

Github is truncating the output for some reason, the remained is some samples with ansi colour codes, then this suggestion:

So in these cases it is necessary to turn the colours off. This is very simple to do, just pass the following argument to SBT:

-Dsbt.log.noformat=true

@sclasen sclasen closed this as completed Apr 2, 2012
@sclasen sclasen reopened this Apr 2, 2012
@sclasen
Copy link
Contributor

sclasen commented Apr 2, 2012

Will put this in with some minor changes going out today.

@sclasen sclasen closed this as completed Apr 2, 2012
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