mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Output right switch depending on logLevel choice
Noticed that from the controller form settings.xml the logLevel selection is a drop down allowing only once choice between: - normal - extensive - debug Added the additional choices: - debug 2 - debug 3 Altered the php code to implement a switch in line with that single possible choice.
This commit is contained in:
@@ -328,8 +328,18 @@ function eval_optional_acme_args()
|
||||
$acme_args[] = isset($options["S"]) ? "--staging" : null; // for debug purpose
|
||||
|
||||
// Set log level
|
||||
$acme_args[] = $configObj->OPNsense->AcmeClient->settings->logLevel == "normal" ? "--log-level 1" : "--log-level 2";
|
||||
$acme_args[] = $configObj->OPNsense->AcmeClient->settings->logLevel == "debug" ? "--debug" : null;
|
||||
switch($configObj->OPNsense->AcmeClient->settings->logLevel) {
|
||||
case "extended":
|
||||
$acme_args[] = "--log-level 2";
|
||||
case "debug":
|
||||
$acme_args[] = "--debug";
|
||||
case "debug2":
|
||||
$acme_args[] = "--debug 2";
|
||||
case "debug3":
|
||||
$acme_args[] = "--debug 3";
|
||||
default:
|
||||
$acme_args[] = "--log-level 1";
|
||||
}
|
||||
|
||||
// Remove empty and duplicate elements from array
|
||||
return(array_unique(array_filter($acme_args)));
|
||||
|
||||
Reference in New Issue
Block a user