Bug 232994

Summary: Do not colourize printouts when redirected
Product: [Fedora] Fedora Reporter: Pete Zaitcev <zaitcev>
Component: gstreamerAssignee: Adam Jackson <ajax>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bnocera
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-11 14:58:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pete Zaitcev 2007-03-19 19:54:40 UTC
Description of problem:

When output of Totem is redirected, it retains colored marks like "WARN",
which makes them hard to read.

Version-Release number of selected component (if applicable):

gstreamer-0.10.12-1.fc7

How reproducible:

100%, but you need a way to trigger the output from the library.

Steps to Reproduce:
1. Run this:
   GST_DEBUG=*:2 totem dvd://2 >totem.run 2>&1 </dev/null
2. Do something to produce "WARN"
   (in case of DVD, perhaps nothing is needed, there's a ton of
   "Queue is bigger than 20Mbytes"
3. Open the file totem.run in a text editor

Actual results:

File is full of color-changing escapes

Expected results:

A readable trace

Additional info:

This should be similar to behaviour of ls(1). The standard way to
determine if the descriptor is interactive is isatty(3). If you
use the standard I/O library, you can get the current
file descriptor with fileno(3).

Comment 1 Bastien Nocera 2007-04-11 14:58:55 UTC
This can already be achieved with "export GST_DEBUG_NO_COLOR=1".

The point of the colourised output is to be able to separate different types of
warnings and errors easily, and you can read the file with all its colours using
"less -R".

I would advise you to file a bug upstream against GStreamer
(http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer) if you feel strongly
about this.