diff options
author | Damien F. Katz <damien@apache.org> | 2008-04-20 18:17:15 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-04-20 18:17:15 +0000 |
commit | fb5b6bbc5aa941478d700e8fb3011c2a24c4d2d4 (patch) | |
tree | bcc23ed4869f395e894f76ec3fb5e76f75a5ba98 /src/couchdb/couch_db.hrl | |
parent | ad230e67fb09883e2171291d5a42635f5e2addb9 (diff) |
Added proper UUID generation and changed the details of how way debug logging is done to now use a more effcient macro instead of a function call.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@649948 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db.hrl')
-rw-r--r-- | src/couchdb/couch_db.hrl | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/couchdb/couch_db.hrl b/src/couchdb/couch_db.hrl index 51ee7af2..e4cf00ea 100644 --- a/src/couchdb/couch_db.hrl +++ b/src/couchdb/couch_db.hrl @@ -15,6 +15,21 @@ -define(DESIGN_DOC_PREFIX, "_design/"). -define(DEFAULT_ATTACHMENT_CONTENT_TYPE, "application/octet-stream"). + +-define(LOG_DEBUG(Format, Args), + case couch_log:debug_on() of + true -> error_logger:info_report(couch_debug, {Format, Args}); + false -> ok + end). + +-define(LOG_INFO(Format, Args), + case couch_log:info_on() of + true -> error_logger:info_report(couch_info, {Format, Args}); + false -> ok + end). + +-define(LOG_ERROR(Format, Args), + error_logger:info_report(couch_error, {Format, Args})). -record(doc_info, { @@ -53,4 +68,3 @@ % couch_db:open_doc(Db, Id, Options). meta = [] }). - |