Summary:ASTERISK-15993: [patch] Colourized logging option request as an option
Reporter:Dayton Turner (dayton)Labels:
Date Opened:2010-04-21 14:03:32Date Closed:2010-05-12 13:04:23
Versions:Frequency of
Environment:Attachments:( 0) strip_color.patch
Description:I noticed that recently there was a patch submitted to remove colorized escape sequences from log files,

The decision was made to not offer this as an option, however, I find it incredibly useful when debugging certain features to retain color codes in the log files to read it easier.  This being suddenly gone, could be considered a regression.

On IRC, Naikrovek mentioned that a recent discovery was made correlating writing color codes to log files with CPU spikes.  Of course, if this is infact the case, it should not be added as an option until the CPU spike is solved (if it is possible to be solved, of course)

But, on the grounds that it was once an available feature, that I welcomed and took advantage of for debugging purposes, I would like to see it re-introduced as a configurable option.
Comments:By: Dayton Turner (dayton) 2010-04-21 14:34:52

Disregard my mention of any cpu spike problems with color, it is completely unrelated and not a bug.

By: Leif Madsen (lmadsen) 2010-04-21 14:36:23

Marked as a regression. Also fixed spelling of "colourized" :)

By: Leif Madsen (lmadsen) 2010-04-21 15:05:41

Patch available!

By: Paul Belanger (pabelanger) 2010-04-21 15:05:53

Give this patch a try, and provide feed back.

Still need to make documentation changes.

By: Tilghman Lesher (tilghman) 2010-04-21 15:09:40

I really don't see this as a regression, more as the reintroduction of a bug.  Terminal codes should never have been going to the logfiles in the first place.  There are certainly logfile readers that introduce color codes for ease of reading, and I encourage the reporter to go down that route, instead of adding this option to Asterisk.

By: Dayton Turner (dayton) 2010-04-21 15:47:09

Tilghman, can you suggest a logfile reader that parses asterisk logfiles and colors them according to how asterisk does naturally, as I am familiar with them while watching in realtime in the CLI?

If this is reintroduced as a configurable option that defaults to no, I dont see how this could possibly harm anyone.

By: Tilghman Lesher (tilghman) 2010-04-21 16:51:11

I'm not suggesting that such a logfile reader exists, only that it should be the recommended path to take.  If you're not willing to take that path, well, that is up to you.  But we're simply not going to spend any more time reverting real bugs by introducing an option for it.  There are far more pressing issues.