diff options
author | Heinz N. Gies <heinz@licenser.net> | 2016-02-09 14:03:08 -0500 |
---|---|---|
committer | Heinz N. Gies <heinz@licenser.net> | 2016-02-09 14:03:08 -0500 |
commit | 949eafd8991292b1726e735d356864f079e8313a (patch) | |
tree | 846283792178b439f43c00fe5530e0ccbec6adb1 | |
parent | 2f563041cb248ba0cac27b92da5dcc3e7be27f80 (diff) |
Some cleanup
-rw-r--r-- | src/rebar_log.erl | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/rebar_log.erl b/src/rebar_log.erl index d921110..eb37869 100644 --- a/src/rebar_log.erl +++ b/src/rebar_log.erl @@ -43,6 +43,16 @@ %% Public API %% =================================================================== +intensity() -> + case os:getenv("REBAR_COLOR") of + "high" -> + high; + "low" -> + low; + _ -> + ?DFLT_INTENSITY + end. + init(Caller, Verbosity) -> Level = case valid_level(Verbosity) of ?ERROR_LEVEL -> error; @@ -50,14 +60,7 @@ init(Caller, Verbosity) -> ?INFO_LEVEL -> info; ?DEBUG_LEVEL -> debug end, - Intensity = case os:getenv("REBAR_COLOR") of - "high" -> - high; - "low" -> - low; - _ -> - ?DFLT_INTENSITY - end, + Intensity = intensity(), Log = ec_cmd_log:new(Level, Caller, Intensity), application:set_env(rebar, log, Log). |