plugins: replace relevant log_error() with log_msg() calls

PR: https://github.com/opnsense/core/issues/6115
This commit is contained in:
Franco Fichtner 2023-01-18 14:36:18 +01:00
parent 5a7c598321
commit ec1399c9a2
5 changed files with 11 additions and 13 deletions

View File

@ -38,12 +38,12 @@ if (frr_carp_enabled()) {
$type = !empty($argv[2]) ? $argv[2] : '';
if ($type != 'MASTER' && $type != 'BACKUP') {
log_error("Carp '$type' event unknown from source '{$subsystem}'");
log_msg("Carp '$type' event unknown from source '{$subsystem}'");
exit(1);
}
if (!strstr($subsystem, '@')) {
log_error("Carp '$type' event triggered from wrong source '{$subsystem}'");
log_msg("Carp '$type' event triggered from wrong source '{$subsystem}'");
exit(1);
}

View File

@ -42,12 +42,12 @@ if ($mdns_repeater_carp_enabled) {
$type = !empty($argv[2]) ? $argv[2] : '';
if ($type != 'MASTER' && $type != 'BACKUP') {
log_error("Carp '$type' event unknown from source '{$subsystem}'");
log_msg("Carp '$type' event unknown from source '{$subsystem}'");
exit(1);
}
if (!strstr($subsystem, '@')) {
log_error("Carp '$type' event triggered from wrong source '{$subsystem}'");
log_msg("Carp '$type' event triggered from wrong source '{$subsystem}'");
exit(1);
}

View File

@ -159,10 +159,10 @@ function miniupnpd_configure_do($verbose = false)
$ifaces_active .= ", {$iface}";
}
} else {
log_error("miniupnpd: Interface {$iface} has no ip address, ignoring");
log_msg("miniupnpd: Interface {$iface} has no ip address, ignoring", LOG_WARING);
}
} else {
log_error("miniupnpd: Could not resolve real interface for {$iface}");
log_msg("miniupnpd: Could not resolve real interface for {$iface}", LOG_ERR);
}
}
@ -238,7 +238,8 @@ function miniupnpd_configure_do($verbose = false)
/* write out the configuration */
file_put_contents('/var/etc/miniupnpd.conf', $config_text);
log_error("miniupnpd: Starting service on interface: {$ifaces_active}");
log_msg("miniupnpd: Starting service on interface: {$ifaces_active}");
miniupnpd_start();
}
}

View File

@ -39,12 +39,12 @@ if (softether_carp_enabled()) {
$type = !empty($argv[2]) ? $argv[2] : '';
if ($type != 'MASTER' && $type != 'BACKUP') {
log_error("Carp '$type' event unknown from source '{$subsystem}'");
log_msg("Carp '$type' event unknown from source '{$subsystem}'");
exit(1);
}
if (!strstr($subsystem, '@')) {
log_error("Carp '$type' event triggered from wrong source '{$subsystem}'");
log_msg("Carp '$type' event triggered from wrong source '{$subsystem}'");
exit(1);
}

View File

@ -166,12 +166,9 @@ function create_work_files($include_tls_handshake)
@touch($target);
$work_files[] = $target;
} else {
log_error("Failed renaming '$source' to '$target'. Skipping source for next run.");
log_msg("Failed renaming '$source' to '$target'. Skipping source for next run.");
}
}
} else {
//Concurrent invocation. Can be silently ignored since no work files are collected.
//log_error("Skipping processing. Missing: " . join(", ", array_diff(array_keys($mapping), $existing_sources)));
}
reopen_logs();