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/03/09 17:40:54 UTC

[GitHub] [couchdb] iilyak commented on pull request #3380: Clean up logs 3.x.v2

iilyak commented on pull request #3380:
URL: https://github.com/apache/couchdb/pull/3380#issuecomment-794215510


   > I don't understand these;
   > 
   > ```
   > format_status(normal, [_PDict, State]) ->
   >     [{data, [{"State", State}]}];
   > 
   > format_status(terminate, [PDict, State]) ->
   >     {State, #{module => ?MODULE, dictionary => PDict}}.
   > ```
   > 
   > Why so many conversions to map?
   
   There is no conversion to map for the state of the `gen_server`. The state is returned as is. The only thing I do here is return additional context. I.e. return `{State, Ctx}` instead of `State`. Then the `couch_log_formatter` passes the Ctx to plug-able sanitizer module. If `sanitizer` is not specified `Ctx` is not used or logged. 


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