Project

General

Profile

« Previous | Next » 

Revision 4245a90e

Added by → luckman212 almost 7 years ago

reduce the tons of log spew that currently spit out during boot
and gateway failure events. Try to make the logs readable again,
while still allowing verbose logging if needed via a new hidden
config option:

['system']['gw-debug']

(cherry picked from commit f406f896444ec0c5d8fba00fa94cde0f1139b69c)

View differences:

src/etc/inc/gwlb.inc
1112 1112
				if ($gwgroupitem['gwip'] == $currentdefaultgwip) {
1113 1113
					$set_dfltgwname = $gwgroupitem['gw'];
1114 1114
					$found_current = true;
1115
					log_error("Keep current gateway, its already part of the group members.");
1115
					if (isset($config['system']['gw-debug'])) {
1116
						log_error("Keep current gateway, its already part of the group members.");
1117
					}
1116 1118
					break;
1117 1119
				}
1118 1120
			}
......
1263 1265
	if ($tiers_count == 0) {
1264 1266
		/* Oh dear, we have no members! Engage Plan B */
1265 1267
		if (!platform_booting()) {
1266
			$msg = sprintf(gettext('Gateways status could not be determined, considering all as up/active. (Group: %s)'), $group['name']);
1267
			log_error($msg);
1268
			notify_via_growl($msg);
1269
			//notify_via_smtp($msg);
1268
			if (isset($config['system']['gw-debug'])) {
1269
				$msg = sprintf(gettext('Gateways status could not be determined, considering all as up/active. (Group: %s)'), $group['name']);
1270
				log_error($msg);
1271
				notify_via_growl($msg);
1272
				//notify_via_smtp($msg);
1273
			}
1270 1274
		}
1271 1275
		$tiers = $backupplan;
1272 1276
	}

Also available in: Unified diff