diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-06-14 18:45:49 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-06-14 18:45:49 +0000 |
commit | cd39ebe7d12d999324ff2cc9842567b34dc4d4c7 (patch) | |
tree | 00bde7d855ba9cd07c2e5d0463dfd32c4f0badcc /src/couchdb/couch_os_process.erl | |
parent | 88fcbd2cdd14fedab900fbf3af3deb5fe15f4390 (diff) |
merge list-iterator branch to trunk. changes JavaScript _list API
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@784601 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_os_process.erl')
-rw-r--r-- | src/couchdb/couch_os_process.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/couchdb/couch_os_process.erl b/src/couchdb/couch_os_process.erl index 66853b65..ef2e8bfc 100644 --- a/src/couchdb/couch_os_process.erl +++ b/src/couchdb/couch_os_process.erl @@ -53,7 +53,7 @@ prompt(Pid, Data) -> {ok, Result} -> Result; Error -> - ?LOG_DEBUG("OS Process Error ~p",[Error]), + ?LOG_ERROR("OS Process Error :: ~p",[Error]), throw(Error) end. @@ -81,20 +81,22 @@ readline(OsProc, Acc) when is_record(OsProc, os_proc) -> % Standard JSON functions writejson(OsProc, Data) when is_record(OsProc, os_proc) -> + % ?LOG_DEBUG("OS Process Input :: ~p", [Data]), true = writeline(OsProc, ?JSON_ENCODE(Data)). readjson(OsProc) when is_record(OsProc, os_proc) -> Line = readline(OsProc), case ?JSON_DECODE(Line) of - {[{<<"log">>,Msg}]} when is_binary(Msg) -> + [<<"log">>, Msg] when is_binary(Msg) -> % we got a message to log. Log it and continue - ?LOG_INFO("OS Process Log Message: ~s", [Msg]), + ?LOG_INFO("OS Process :: ~s", [Msg]), readjson(OsProc); {[{<<"error">>, Id}, {<<"reason">>, Reason}]} -> throw({list_to_atom(binary_to_list(Id)),Reason}); {[{<<"reason">>, Reason}, {<<"error">>, Id}]} -> throw({list_to_atom(binary_to_list(Id)),Reason}); Result -> + % ?LOG_DEBUG("OS Process Output :: ~p", [Result]), Result end. |