summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2009-11-29 16:44:30 -0700
committerDave Smith <dizzyd@dizzyd.com>2009-11-29 16:44:30 -0700
commit28fe3bfd54390a4ea74156b5f182d59f69d32331 (patch)
tree1a10e44874dc379c433ae4f759f74ae1ca4843ea /include
parent0151f63239117024d30e090b8c178c188f45a52a (diff)
downloadrebar-28fe3bfd54390a4ea74156b5f182d59f69d32331.tar.gz
More gross structural work; now has log levels and broken out log level control
Diffstat (limited to 'include')
-rw-r--r--include/rebar.hrl10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/rebar.hrl b/include/rebar.hrl
index fba5885..35de9f5 100644
--- a/include/rebar.hrl
+++ b/include/rebar.hrl
@@ -1,8 +1,14 @@
-record(global_state, { working_dir }).
+-define(FAIL, throw({error, failed})).
+
-define(CONSOLE(Str, Args), io:format(Str, Args)).
--define(WARN(Str, Args), io:format("WARN: " ++ Str, Args)).
--define(FAIL, throw({error, failed})).
+-define(DEBUG(Str, Args), rebar_log:log(debug, Str, Args)).
+-define(INFO(Str, Args), rebar_log:log(info, Str, Args)).
+-define(WARN(Str, Args), rebar_log:log(warn, Str, Args)).
+-define(ERROR(Str, Args), rebar_log:log(error, Str, Args)).
+
+-define(FMT(Str, Args), lists:flatten(io_lib:format(Str, Args))).