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 2021/04/23 21:16:53 UTC

[GitHub] [couchdb] nickva commented on a change in pull request #3526: Adopt structured logging via new Erlang 21 logger

nickva commented on a change in pull request #3526:
URL: https://github.com/apache/couchdb/pull/3526#discussion_r619500068



##########
File path: src/couch_replicator/src/couch_replicator_changes_reader.erl
##########
@@ -60,14 +61,23 @@ read_changes(Parent, StartSeq, Db, ChangesQueue, Options) ->
         N when N > 0 ->
             put(retries_left, N - 1),
             LastSeq = get(last_seq),
+            LogMsg = #{
+                what => retry_changes_feed,
+                in => replicator,
+                source => couch_replicator_api_wrap:db_uri(Db),
+                sequence => LastSeq,
+                retries_remaining => N
+            },
             Db2 = case LastSeq of
             StartSeq ->
+                ?LOG_NOTICE(maps:merge(LogMsg, #{delay => Db#httpdb.wait / 1000})),

Review comment:
       Could do `LogMsg#{delay => Db#httpdb.wait / 1000}` here too, it's a bit shorter. Same for other `maps:merge` calls




-- 
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