You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/07/29 07:36:58 UTC

[GitHub] [couchdb] tonysun83 commented on a change in pull request #3031: Clean up logs

tonysun83 commented on a change in pull request #3031:
URL: https://github.com/apache/couchdb/pull/3031#discussion_r461326057



##########
File path: src/setup/src/setup_httpd.erl
##########
@@ -173,3 +173,8 @@ get_body(Req) ->
         couch_log:notice("Body Fail: ~p~n", [Else]),
         couch_httpd:send_error(Req, 400, <<"bad_request">>, <<"Missing JSON body'">>)
     end.
+
+remove_sensitive(KVList0) ->
+    KVList1 = lists:keyreplace(<<"username">>, 1, KVList0, {<<"username">>, <<"****">>}),
+    KVList2 = lists:keyreplace(<<"password">>, 1, KVList1, {<<"password">>, <<"****">>}),
+    KVList2.

Review comment:
       is this redundant or just a stylist preference?

##########
File path: src/couch_log/src/couch_log_config.erl
##########
@@ -97,4 +98,10 @@ transform(max_message_size, SizeStr) ->
         Size -> Size
     catch _:_ ->
         16000
-    end.
\ No newline at end of file
+    end;
+
+transform(strip_last_msg, "false") ->
+    false;
+
+transform(strip_last_msg, _) ->
+    true.

Review comment:
       add an  end of line here

##########
File path: src/couch_mrview/src/couch_mrview_index.erl
##########
@@ -324,3 +325,14 @@ update_local_purge_doc(Db, State, PSeq) ->
             BaseDoc
     end,
     couch_db:update_doc(Db, Doc, []).
+
+format_status(_Opt, [_PDict, State]) ->

Review comment:
       If we're doing this for traditional views as well, do we need to modify this section as well: https://github.com/apache/couchdb/blob/master/src/dreyfus/src/dreyfus_index.erl#L37?
   

##########
File path: src/couch/src/couch_work_queue.erl
##########
@@ -186,3 +186,18 @@ code_change(_OldVsn, State, _Extra) ->
 
 handle_info(X, Q) ->
     {stop, X, Q}.
+
+format_status(_Opt, [_PDict, Queue]) ->
+    #q{
+        queue = Q,
+        blocked = Blocked,
+        work_waiters = Waiters
+    } = Queue,
+    Scrubbed = Queue#q{
+        queue = queue:len(Q),
+        blocked = length(Blocked),
+        work_waiters = length(Waiters)
+    },
+    [{data, [{"State",
+        ?record_to_keyval(q, Scrubbed)
+    }]}].

Review comment:
       whitespace




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org