From 28fe3bfd54390a4ea74156b5f182d59f69d32331 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Sun, 29 Nov 2009 16:44:30 -0700 Subject: More gross structural work; now has log levels and broken out log level control --- include/rebar.hrl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') 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))). -- cgit v1.2.1