Merge pull request #98 from tsloughter/cf_fix

fix colorizing when not bold, type of fase for false
This commit is contained in:
Jordan Wilberding 2015-11-21 13:59:50 -08:00
commit 0a4d2811f1
2 changed files with 5 additions and 5 deletions

View file

@ -242,11 +242,11 @@ format(Log) ->
%% (bold color) we don't need to modify the color %% (bold color) we don't need to modify the color
colorize(State, Color, true, Msg) when ?VALID_COLOR(Color), colorize(State, Color, true, Msg) when ?VALID_COLOR(Color),
Color >= $A, Color =< $Z -> Color >= $A, Color =< $Z ->
colorize(State, Color, fase, Msg); colorize(State, Color, false, Msg);
%% We're sneaky we can substract 32 to get the uppercase character if we want %% We're sneaky we can substract 32 to get the uppercase character if we want
%% bold but have a non bold color. %% bold but have a non bold color.
colorize(State, Color, true, Msg) when ?VALID_COLOR(Color) -> colorize(State, Color, true, Msg) when ?VALID_COLOR(Color) ->
colorize(State, Color - 32, fase, Msg); colorize(State, Color - 32, false, Msg);
colorize(#state_t{caller=command_line, intensity = high}, colorize(#state_t{caller=command_line, intensity = high},
Color, false, Msg) when ?VALID_COLOR(Color) -> Color, false, Msg) when ?VALID_COLOR(Color) ->
lists:flatten(cf:format("~!" ++ [Color] ++"~s~s", [?PREFIX, Msg])); lists:flatten(cf:format("~!" ++ [Color] ++"~s~s", [?PREFIX, Msg]));

View file

@ -3,8 +3,8 @@
{vsn,"0.18.0"}, {vsn,"0.18.0"},
{modules,[]}, {modules,[]},
{registered,[]}, {registered,[]},
{applications,[kernel,stdlib]}, {applications,[kernel,stdlib,cf]},
{contributors,["Eric Merritt","Tristan Sloughter", {maintainers,["Eric Merritt","Tristan Sloughter",
"Jordan Wilberding","Martin Logan"]}, "Jordan Wilberding","Martin Logan"]},
{licenses,["Apache"]}, {licenses,["Apache"]},
{links,[{"Github", {links,[{"Github",