mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-24 23:56:29 +00:00
Add log_hint() function for logging hints
There are a few places where additional hints are written as log output, usually LOG_NOTICE. Create an explicit function to provide hints in a standardized manner; by storing the log level of the previous logger call, we can ensure the hint is only displayed when the log message itself would be. Part of an ongoing effort to better control repmgr's logging output.
This commit is contained in:
@@ -281,7 +281,7 @@ main(int argc, char **argv)
|
||||
if (node_info.node_id == NODE_NOT_FOUND)
|
||||
{
|
||||
log_err(_("No metadata record found for this node - terminating\n"));
|
||||
log_notice(_("HINT: was this node registered with 'repmgr (master|standby) register'?\n"));
|
||||
log_hint(_("Check that 'repmgr (master|standby) register' was executed for this node\n"));
|
||||
terminate(ERR_BAD_CONFIG);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user