/
erica.hrl
38 lines (30 loc) · 982 Bytes
/
erica.hrl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%%% -*- erlang -*-
%%%
%%% This file is part of erica released under the Apache 2 license.
%%% See the NOTICE for more information.
-record(config, { dir,
opts,
dbs=[],
hooks=[],
ignore=[],
extensions=[] }).
-record(global_state, { working_dir }).
-define(FAIL, throw({error, failed})).
-define(ABORT(Str, Args), erica_util:abort(Str, Args)).
-define(CONSOLE(Str, Args), io:format(Str, Args)).
-define(DEBUG(Str, Args), erica_log:log(debug, Str, Args)).
-define(INFO(Str, Args), erica_log:log(info, Str, Args)).
-define(WARN(Str, Args), erica_log:log(warn, Str, Args)).
-define(ERROR(Str, Args), erica_log:log(error, Str, Args)).
-define(FMT(Str, Args), lists:flatten(io_lib:format(Str, Args))).
-record(couchapp, {
config,
path,
att_dir,
docid,
doc,
old_doc=nil,
manifest=[],
attachments=[],
signatures=[]
}).