[ 
https://issues.apache.org/jira/browse/IGNITE-17352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konstantin Orlov updated IGNITE-17352:
--------------------------------------
    Ignite Flags:   (was: Docs Required,Release Notes Required)

> Revise module RAFT to align logs with proposed guidelines
> ---------------------------------------------------------
>
>                 Key: IGNITE-17352
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17352
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Konstantin Orlov
>            Priority: Major
>              Labels: ignite-3
>
> To make the logs consistent we need to revise the code of module raft.
> Here are some rule to follow: 
> * Use the following message template: <Short description of the event> [<key 
> value pairs describing context of the event>]. Example:
> ** LOG.info("Start new raft node [group={}, peers={}]", groupId, peers)
> ** LOG.debug("Replicator added [node={}, term={}, peer={}]", getNodeId(), 
> this.currTerm, peer);
> * Prefer simple syntax constructions. 
> ** (x) New leader was elected for the raft group={} of partition={}, table={} 
> and pending reconfiguration to peers={} was discovered
> (/) New leader elected. Going to reconfigure peers [group={}, partition={}, 
> table={}, peers={}]
> ** (x) Table with name '{}' has been created in schema with name '{}'
> (/) Table created [schemaName={}, tableName={}]
> * Avoid using a dot at the end -- this is a log statement, not an essay 
> * Avoid using ERROR level just because we are going to log an exception. 
> Please remember ERROR is an actionable level, which means that attention on 
> an operation team is required. Besides, an ERROR should require an 
> _immediate_ action. The action required should be clear from a message.
> * WARN is an actionable level as well, but the action could be postponed. Use 
> this level to notify an operation team about upcoming failures (i.e. disk 
> usage is above certain threshold) or conditions that may affect the cluster, 
> but the resolution of such condition is not urgent (like happened page 
> replacement, but this is debatable)
> * INFO is a regular level to log any unfrequent event happened in the 
> cluster, like join of a new node
> * DEBUG and TRACE levels don't have any particular rules, but it's nice to 
> have log message consistent across all levels



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to