Closed navaneeth closed 8 years ago
Hi Navaneeth,
We changed the console logs to make it a little neater. It used to have a lot of information earlier on. Now, INFO has limited information but DEBUG will give you all the information you used to see earlier.
You can configure this using gauge --log-level=debug or --log-level=info. info is the default configuration.
If you are referring to the [INFO] against the console output, then this is an error. We will fix that shortly.
I am referring to the colored terminal we had before. By default, log level should be None. For user, all those messages are irrelevant. IMO, unless specified, logging should be turned off or probably write to a log file rather than console. Console should contain only colored spec & scenario execution info.
Earlier, we had our own code to print colored information on the console. But the latest version of the logging library that we are using supports colored output. So we decided to leverage it and refactored around it.
What refactoring changed is the colors that we were using earlier. This is because the default colors provided by go-logging library are not the same as ours. Moreover the library is not exposing an interface to change the default colors. We have created an issue for this and are waiting for their response.
We continued with the refactoring in spite of this known issue because most of the users run specs in parallel, in which case we anyways don't show colored output.
Turning off logging altogether is a separate discussion on its own. We have created a new issue for that.
Looks like the logging library's last commit was some 6 months back. Which gives a me a feeling that it is not actively developed and not sure gauge depending on it will be a good idea.
We continued with the refactoring in spite of this known issue because most of the users run specs in parallel, in which case we anyways don't show colored output.
That is a wrong assumption. When developing test cases, no one runs it in parallel. You will run in it in parallel on a CI box but not while authoring tests. The colored output plays a big role while authoring test cases. It makes it easy for people to figure out the failure. It looks nice. What we get today is just text with some INFO messages. The specification to scenario to concept hierarchy is also not evident from the output.
I'd suggest to go back to the old colored output until the logging library has support for it.
it is not actively developed and not sure gauge depending on it will be a good idea.
Totally agree. We should re-validate our choice of logging library.
You will run in it in parallel on a CI box but not while authoring tests.
This is an interesting point. We discussed this in the team today and concluded that we should speak to few end users, come up with a structure about what the logs should look like and change it accordingly.
We discussed this in the team today and concluded that we should speak to few end users, come up with a structure about what the logs should look like and change it accordingly.
Colored console output was designed after talking to many Twist customers. Feel free to redo the experiment, but not sure whether you will get a different result.
Also this is preventing me to pitch gauge to a potential customer.
@navaneeth We have coloured console output but admittedly the colours aren't as nice as what we had before. If you do change to use debug mode then there are colours, but we understand that is something we need to improve. I would like us to do this experiment again, and hopefully the result is no different.
Regarding the potential customer, we're very sorry to hear that the console log colours are causing so much trouble. This we did not anticipate. Like Mahendra said, we will get to this soon. In the meantime, if this is causing a lot of trouble, maybe you can use the previous version of Gauge(0.1.7), this has the old console log format?
I hope this helps.
We have coloured console output but admittedly the colours aren't as nice as what we had before. If you do change to use debug mode then there are colours,
Ahh, I see them now. But they needs lot of polishing before pushing to the end user. The Spec-Scenario hierarchy is also not visible. There are ugly DEBUG prefixes everywhere and lot of unwanted newlines.
if this is causing a lot of trouble, maybe you can use the previous version of Gauge(0.1.7), this has the old console log format?
I did the demo by hacking my local copy. But to deploy on their infrastructure, I will use 0.1.7.
Any more thoughts/update on this?
Hey @navaneeth, we had a few discussions on this, expecting to put in some effort in the next few days. We are trying to figure out what can work for most users, whether through configurations or through sensible defaults. Will keep you posted.
To throw in my two cents, I want colored output when running Gauge specs in Intellij IDEA, but not when running them in the console (which we do on our CI environment). I agree that having colored output was an excellent feature in Twist, but I think it worked because it was a custom view within an IDE that was designed for developers.
@Thunderforge - we have an ambition of integrating Gauge with the Intellij test runner, so the experience is similar to JUnit test execution. But that is still a while away.
We still plan to retain the --simple-console
flag, that would remove any colouring of terminals.
This is what I think
The issue that I was referring to is not just missing colors. But the structure. Keeping the spec to scenario to concept structure and nesting in the output is very important. Previous console output used to do this and buffer the stdout
coming from step executions and color them properly. While the implementation was custom and may need polishing, it used to work well.
I would be happy with the behavior described by @navaneeth. It allows for console-specific and IDE-specific outputs. As long as --simple
or a similar flag can turn off coloring and other information in the console, I think that this will be acceptable.
@navaneeth Colored console reporting is back in Gauge v0.3.0. It works on Windows as well! Please give it a try and let us know what you think.
I am closing this issue. Feel free to reopen in case it doesn't work for you.
This is what I see when I execute.
I also see lot of unwanted, verbose INFO messages.