Giter VIP home page Giter VIP logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
This might be a good idea to support colors. However, I'm not sure if it's 
trivial to 
implement this feature portably (we may need to check termcap/terminfo?). This 
will 
take long time for me. Patches are welcomed :)

Original comment by [email protected] on 27 May 2010 at 9:18

  • Changed state: Accepted

from google-glog.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Attached is a patch for part of this issue - it optionally makes FATAL & ERROR 
message red, and WARNING yellow when logging to stderr, -colorstderr is passed 
_and_ the current terminal supports colored output.  It does not color any VLOG 
output.

I should emphasise that in terms of work most of the legwork in this patch is 
taken from the gtest project (and thus license compatible etc).  I'm only 
responsible for plumbing it into glog (I'll let others judge how cleanly :P)

I have tested it against the latest in SVN (Rev 121) on OS X (10.7.x) & Ubuntu 
12.04 - although I don't have access to a Windows box, the code for Windows 
colorisation is taken directly from gtest and so I strongly suspect it will 
work, but I haven't tested it.

Original comment by [email protected] on 11 Jan 2013 at 9:37

Attachments:

from google-glog.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Great!

Could you sign our Contributor License Agreement, please? It
seems that we need to ask you to sign this to avoid any troubles. The
process is just submitting an HTML form, and it shouldn't take your
time so much.

http://code.google.com/legal/individual-cla-v1.0.html

Please note that these forms do not transfer copyright: the
contributor retains her ownership in the work. The CLA just grants
Google a "perpetual, non-exclusive, royalty-free, etc..." right to use
the work, sublicense it, and so on.

Original comment by [email protected] on 12 Jan 2013 at 3:36

from google-glog.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
CLA signed (electronically) - let me know if there's anything else I need to do.

Original comment by [email protected] on 12 Jan 2013 at 1:29

from google-glog.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Done by http://code.google.com/p/google-glog/source/detail?r=123

I modified this patch by

http://code.google.com/p/google-glog/source/detail?r=124

Note that I renamed the name of flag (colorstderr => colorlogtostderr) because 
original name sounds a bit too general.

Original comment by [email protected] on 23 Jan 2013 at 5:32

from google-glog.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024

Original comment by [email protected] on 23 Jan 2013 at 5:32

  • Changed state: Fixed

from google-glog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.