From 6fce297e9ff9f495b10281f2c5c78e6e0c2d48ad Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 22 Feb 2010 12:19:15 -0800 Subject: merge attempt #1 --- include/common.hrl | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/common.hrl (limited to 'include/common.hrl') diff --git a/include/common.hrl b/include/common.hrl new file mode 100644 index 00000000..2299950d --- /dev/null +++ b/include/common.hrl @@ -0,0 +1,41 @@ + +-include_lib("eunit/include/eunit.hrl"). + +-define(fmt(Msg, Args), lists:flatten(io_lib:format(Msg, Args))). +-define(infoFmt(Msg, Args), error_logger:info_msg(Msg, Args)). +-define(infoMsg(Msg), error_logger:info_msg(Msg)). + + +%% from couch_db.hrl +-ifndef(LOG_DEBUG). +-define(LOG_DEBUG(Format, Args), + showroom_log:message(debug, Format, Args)). +-endif. + +-ifndef(LOG_INFO). +-define(LOG_INFO(Format, Args), + showroom_log:message(info, Format, Args)). +-endif. + +-ifndef(LOG_ERROR). +-define(LOG_ERROR(Format, Args), + showroom_log:message(error, Format, Args)). +-endif. + +%% -define(PMAP(F,L), lists:map(F,L)). +-define(PMAP(F,L), showroom_utils:pmap(F,L)). + + +%% +%% membership2 (in here for separate testing module) +%% + +-define(VERSION,2). + +-record(membership, {header=?VERSION, + node, + nodes, + partitions, + version, + fullmap + }). -- cgit v1.2.3