[ 
https://issues.apache.org/jira/browse/RATIS-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16450357#comment-16450357
 ] 

Tsz Wo Nicholas Sze commented on RATIS-230:
-------------------------------------------

> While logging errors in RaftServerProtocolService we are mentioning the 
> follower id first ...

In RaftServerProtocolService, we print the local server id (e.g. "s0:").  Note 
the server may or may not be a leader.  In all the server log messages, we 
should do the same -- just print the local server id first so that we could 
tell which messages are from which server.

When we print the request, we will see who are the sender and replier of the 
request.

> Also we can include some identifier like LEADER so that we can use a string 
> like "LEADER s0" for searching all the logs involving LEADER s0?

In ServerState.setRole, we print a message for each role change.  I think it is 
easy to determine the server role in the log.

It may be a good idea to print the role with the id but it need much more 
changes than the current patch.  And it seems not a good idea if we only do it 
for the Grpc messages.  Let's do it separately.

> Improve gRPC log messages
> -------------------------
>
>                 Key: RATIS-230
>                 URL: https://issues.apache.org/jira/browse/RATIS-230
>             Project: Ratis
>          Issue Type: Improvement
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>            Priority: Minor
>         Attachments: r230_20180420.patch
>
>
> In this JIRA, we propose
> - Stack trace is missing in some exception logs.
> - Change some info message to warn.
> - Check isDebugEnabled and isWarnEnabled.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to