You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2016/07/25 17:58:33 UTC

couch-log commit: updated refs/heads/master to dc8418f

Repository: couchdb-couch-log
Updated Branches:
  refs/heads/master 038586b7a -> dc8418fd5


Reformat emulator error messages


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

Branch: refs/heads/master
Commit: dc8418fd58e72300338fa6480de42ec1bf837886
Parents: 038586b
Author: Paul J. Davis <pa...@gmail.com>
Authored: Mon Jul 25 12:58:29 2016 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Mon Jul 25 12:58:29 2016 -0500

----------------------------------------------------------------------
 src/couch_log_formatter.erl | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/blob/dc8418fd/src/couch_log_formatter.erl
----------------------------------------------------------------------
diff --git a/src/couch_log_formatter.erl b/src/couch_log_formatter.erl
index 089c80f..5be3619 100644
--- a/src/couch_log_formatter.erl
+++ b/src/couch_log_formatter.erl
@@ -80,6 +80,13 @@ format({error, _GL, {Pid, "** gen_event handler" ++ _, Args}}) ->
     MsgArgs = [ID, Name, format_reason(Reason), LastMsg, State],
     format(error, Pid, MsgFmt, MsgArgs);
 
+format({error, _GL, {emulator, "~s~n", [Msg]}}) when is_list(Msg) ->
+    % These messages are for whenever any process exits due
+    % to a throw or error. We intercept here to remove the
+    % extra newlines.
+    NewMsg = lists:sublist(Msg, length(Msg) - 1),
+    format(error, emulator, NewMsg);
+
 format({error, _GL, {Pid, Fmt, Args}}) ->
     format(error, Pid, Fmt, Args);