Commit graph

14 commits

Author SHA1 Message Date
Joe DeVivo
f64a4b1661 Add the ability to explicitly turn off ANSI color 2016-10-29 05:35:41 -07:00
Tristan Sloughter
60eb82aed5 fix colorizing when not bold, type of fase for false 2015-11-21 15:23:06 -06:00
Heinz N. Gies
f983b1ac85 Update cmd_log to use cf for color encoding, including term detection 2015-10-31 18:03:30 +01:00
Heinz N. Gies
87c76aeb2a Alow less colourful output
Basically this adds a new/3 with a third argument of intensity.
The default (and by that the behaviour of new/1 and /2) remain
unchanged so existing code isn't affected.

If intenisty is set to `low` (instead of `high`) then only the
prefix is coloured making the whole output less colourful and
for some cases easyer to read.
2015-09-23 20:41:15 +02:00
Eric Merritt
739a9bcf24 Swap DEV_ONLY for TEST in the test exclusion macros 2015-09-07 10:45:58 -07:00
Jordan Wilberding
ef0d252b11 Merge pull request #79 from tsloughter/master
18.0 Support
2015-04-23 16:16:34 -07:00
Tristan Sloughter
e07d08333a use #atom{} syntax to support 18 2015-04-23 17:49:34 -05:00
Jesper Louis Andersen
aa373dddbe Introduce simple, preliminary TERM capability query.
When erlware_commons logs to the command_line, it assumes the
environment has common modern capabilities and color display. In
general, this is not the case and then color codes are sent verbatim
to the terminal.

This patch introduces a new field in #state_t{}, term_cap, encoding
if the terminal runs with 'full' or 'dumb' capabilities. In the latter case,
color display is suppressed. Initialization of the #state_t{} record queries
the environment once for the TERM variable in order to figure out what
it supports. The default is 'full' capability to be fully backwards compatible.
2015-02-11 17:10:16 +01:00
Jesper Louis Andersen
6079300634 Refactor: fold colorize_/3 into colorize/4.
Fold a local one-line leaf function with exactly one call-site into its caller.
2015-02-11 17:05:33 +01:00
Tristan Sloughter
4fb4199da3 fix error log message being colored green instead of red 2014-09-27 14:06:49 -05:00
Tristan Sloughter
06390816b9 fix includings of headers 2013-10-24 18:48:34 -05:00
Eric Merritt
efdd2a1092 fix dialyzer issues 2013-10-14 16:20:33 -07:00
Eric Merritt
16b441f0e3 fix up tests to reflect the actual NOTEST variable DEV_ONLY 2013-10-14 14:10:25 -07:00
Eric Merritt
558185b9b9 add a command line programming module to the system
This is a general module that helps output from command line
applications written in erlang.
2013-10-14 09:26:54 -07:00