couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [16/20] git commit: Start using ?LOG_VIEW for view server logs
Date Sat, 02 Feb 2013 15:32:18 GMT
Start using ?LOG_VIEW for view server logs


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/04c89cc2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/04c89cc2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/04c89cc2

Branch: refs/heads/console_log
Commit: 04c89cc2dda543d4a88e7676e1c42210590ae3e8
Parents: 7feb305
Author: Jason Smith (work) <jhs@iriscouch.com>
Authored: Sat Feb 2 13:46:47 2013 +0000
Committer: Jason Smith (work) <jhs@iriscouch.com>
Committed: Sat Feb 2 14:16:12 2013 +0000

----------------------------------------------------------------------
 src/couchdb/couch_db.hrl         |    2 ++
 src/couchdb/couch_os_process.erl |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/04c89cc2/src/couchdb/couch_db.hrl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_db.hrl b/src/couchdb/couch_db.hrl
index 42f10ac..ee40c52 100644
--- a/src/couchdb/couch_db.hrl
+++ b/src/couchdb/couch_db.hrl
@@ -59,6 +59,8 @@
 
 -define(LOG_ERROR(Format, Args), couch_log:error(Format, Args)).
 
+-define(LOG_VIEW(Message), couch_log:view(Message)).
+
 % Tree::term() is really a tree(), but we don't want to require R13B04 yet
 -type branch() :: {Key::term(), Value::term(), Tree::term()}.
 -type path() :: {Start::pos_integer(), branch()}.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/04c89cc2/src/couchdb/couch_os_process.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_os_process.erl b/src/couchdb/couch_os_process.erl
index 3a267be..f4dfc39 100644
--- a/src/couchdb/couch_os_process.erl
+++ b/src/couchdb/couch_os_process.erl
@@ -142,7 +142,7 @@ readjson(OsProc) when is_record(OsProc, os_proc) ->
         case ?JSON_DECODE(Line) of
         [<<"log">>, Msg] when is_binary(Msg) ->
             % we got a message to log. Log it and continue
-            ?LOG_INFO("OS Process ~p Log :: ~s", [OsProc#os_proc.port, Msg]),
+            ?LOG_VIEW(Msg),
             readjson(OsProc);
         [<<"error">>, Id, Reason] ->
             throw({error, {couch_util:to_existing_atom(Id),Reason}});


Mime
View raw message