Ticket #222 (new defect)

Opened 3 months ago

Last modified 2 months ago

Terminal output dissapears and/or changes color

Reported by: watermark.nielsen@gmail.com Assigned to: hans
Priority: major Milestone: 2.3.1
Component: phing-core Version: 2.3.0
Keywords: Cc:

Description

I'm running phing on OS X Leopard via the Terminal.app and when phing targets are executed, the output disappears and can reappear via clicking randomly on where the output should be. Also, the text can change to a brown/bronze color.

When I piped the output to a text editor, I found that some strange characters were being outputted around the lines:

  • [2;36m
  • [2;32m
  • [m

In front of all three of those is a odd character that does not copy/paste well. In TextMate, it shows up as a light gray diamond (Default text color is black). I think it just doesn't know what it is at all.

Anyways, somewhere in the code, these characters are being added. I suspect it might be when a variable is casted to a string.

Attachments

phing.with.dim.PNG (33.7 kB) - added by Bruce Weirdan <weirdan@gmail.com> on 03/06/08 10:18:01.
With dim turned on
phing.without.dim.PNG (32.9 kB) - added by Bruce Weirdan <weirdan@gmail.com> on 03/06/08 10:18:40.
With dim turned off

Change History

02/18/08 17:34:55 changed by anonymous

Please let me know of the fix, as I need to fix it in our repository (we have a phing vendor branch).

02/20/08 00:01:39 changed by david

2 means dim color. the colors are defined in source:/branches/2.3/classes/phing/listener/defaults.properties@355

I guess they are pretty wrong either way, as errors or warnings should be bright, for instance. So we could change the attributes to default to 0, and use 1 (bright/bold) for errors and warnings?

(just tested, 0 and 1 seem to work fine, 2 is wonky on Terminal.app in OS X 10.5.2)

02/20/08 04:03:59 changed by anonymous

I'm still experiencing same problems with all of those defaults set to 0. Is there a way to disable the coloring entirely?

02/20/08 04:11:57 changed by anonymous

I found that if I changed

-logger phing.listener.AnsiColorLogger

To

-logger phing.listener.DefaultLogger

In bin/phing on line 83 then that avoids using the AnsiColor output.

02/20/08 12:02:17 changed by hans

If you're still seeing the odd behavior with defaults set to 0, make sure you're using latest SVN version. There was a bug where the logger wasn't picking up the color properties file.

02/20/08 12:02:59 changed by hans

Oh, and you can modify your "phing" shell script to change the AnsiColorLogger, so you don't have to specify it every time on the commandline.

02/20/08 17:19:49 changed by anonymous

Thanks for the responses Hans. I think I'll go with the phing shell script fix for now until a new version of phing has been released.

I don't know if you want to move forward with changing the default attributes to 0 or 1 instead of 2 to make it more compatible with Terminal.app, but at least now I know where I can modify them myself.

03/06/08 10:17:16 changed by Bruce Weirdan <weirdan@gmail.com>

Here's another problem with ATTR_DIM - it causes colored output to be underlined (see attached screenshot) when shell is ran via screen command. I found that removing attributes from color codes altogether solves this issue.

03/06/08 10:18:01 changed by Bruce Weirdan <weirdan@gmail.com>

  • attachment phing.with.dim.PNG added.

With dim turned on

03/06/08 10:18:40 changed by Bruce Weirdan <weirdan@gmail.com>

  • attachment phing.without.dim.PNG added.

With dim turned off


Add/Change #222 (Terminal output dissapears and/or changes color)