summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_log.erl
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2011-07-06 12:27:15 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2011-07-06 12:27:15 +0000
commit8d53b7d926c9169c914f6421e681842529d9ac3f (patch)
tree5f17b383661629c71b1fd24154145cf28cd76e4b /src/couchdb/couch_log.erl
parent5fa79a85bcb2eea059fd948e89433965f8160b1f (diff)
Merge revision 1143375 from trunk
Redefine logging macros With these macro definitions we don't evaluate the arguments if the corresponding log level is not enabled. This behaviour was accidently removed by the patch from COUCHDB-1054. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1143376 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_log.erl')
-rw-r--r--src/couchdb/couch_log.erl18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/couchdb/couch_log.erl b/src/couchdb/couch_log.erl
index b3d3297c..67549bcc 100644
--- a/src/couchdb/couch_log.erl
+++ b/src/couchdb/couch_log.erl
@@ -25,22 +25,12 @@
-define(LEVEL_TMI, 0).
debug(Format, Args) ->
- case debug_on() of
- false ->
- ok;
- true ->
- {ConsoleMsg, FileMsg} = get_log_messages(self(), debug, Format, Args),
- gen_event:sync_notify(error_logger, {couch_debug, ConsoleMsg, FileMsg})
- end.
+ {ConsoleMsg, FileMsg} = get_log_messages(self(), debug, Format, Args),
+ gen_event:sync_notify(error_logger, {couch_debug, ConsoleMsg, FileMsg}).
info(Format, Args) ->
- case info_on() of
- false ->
- ok;
- true ->
- {ConsoleMsg, FileMsg} = get_log_messages(self(), info, Format, Args),
- gen_event:sync_notify(error_logger, {couch_info, ConsoleMsg, FileMsg})
- end.
+ {ConsoleMsg, FileMsg} = get_log_messages(self(), info, Format, Args),
+ gen_event:sync_notify(error_logger, {couch_info, ConsoleMsg, FileMsg}).
error(Format, Args) ->
{ConsoleMsg, FileMsg} = get_log_messages(self(), error, Format, Args),