Support disabling keepalive logging

This commit is contained in:
Joshua Boniface 2019-06-18 12:44:07 -04:00
parent b0411e8e1a
commit aee078f3eb
2 changed files with 39 additions and 35 deletions

View File

@ -119,6 +119,8 @@ pvc:
file_logging: True file_logging: True
# stdout_logging: Enable or disable logging to stdout (i.e. journald) # stdout_logging: Enable or disable logging to stdout (i.e. journald)
stdout_logging: True stdout_logging: True
# log_keepalives: Enable or disable keepalive logging
log_keepalives: True
# console_log_lines: Number of console log lines to store in Zookeeper per VM # console_log_lines: Number of console log lines to store in Zookeeper per VM
console_log_lines: 1000 console_log_lines: 1000
# networking: PVC networking configuration # networking: PVC networking configuration

View File

@ -144,6 +144,7 @@ def readConfig(pvcd_config_file, myhostname):
'console_log_directory': o_config['pvc']['system']['configuration']['directories']['console_log_directory'], 'console_log_directory': o_config['pvc']['system']['configuration']['directories']['console_log_directory'],
'file_logging': o_config['pvc']['system']['configuration']['logging']['file_logging'], 'file_logging': o_config['pvc']['system']['configuration']['logging']['file_logging'],
'stdout_logging': o_config['pvc']['system']['configuration']['logging']['stdout_logging'], 'stdout_logging': o_config['pvc']['system']['configuration']['logging']['stdout_logging'],
'log_keepalives': o_config['pvc']['system']['configuration']['logging']['log_keepalives'],
'console_log_lines': o_config['pvc']['system']['configuration']['logging']['console_log_lines'], 'console_log_lines': o_config['pvc']['system']['configuration']['logging']['console_log_lines'],
'keepalive_interval': o_config['pvc']['system']['fencing']['intervals']['keepalive_interval'], 'keepalive_interval': o_config['pvc']['system']['fencing']['intervals']['keepalive_interval'],
'fence_intervals': o_config['pvc']['system']['fencing']['intervals']['fence_intervals'], 'fence_intervals': o_config['pvc']['system']['fencing']['intervals']['fence_intervals'],
@ -1120,6 +1121,7 @@ def update_zookeeper():
zkhandler.writedata(zk_conn, { '/nodes/{}/daemonstate'.format(node_name): 'dead' }) zkhandler.writedata(zk_conn, { '/nodes/{}/daemonstate'.format(node_name): 'dead' })
# Display node information to the terminal # Display node information to the terminal
if config['log_keepalives']:
logger.out( logger.out(
'{}{} keepalive{}'.format( '{}{} keepalive{}'.format(
logger.fmt_purple, logger.fmt_purple,