mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-28 06:20:14 +00:00
allow to adjust the log level globally
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
@@ -253,6 +253,11 @@ class ConfigurationManager
|
||||
set { $this->set('docker_socket_path', $value); }
|
||||
}
|
||||
|
||||
public string $aioLogLevel {
|
||||
get => $this->getEnvironmentalVariableOrConfig('AIO_LOG_LEVEL', 'aio_log_level', 'warn');
|
||||
set { $this->set('aio_log_level', $value); }
|
||||
}
|
||||
|
||||
public string $trustedCacertsDir {
|
||||
get => $this->getEnvironmentalVariableOrConfig('NEXTCLOUD_TRUSTED_CACERTS_DIR', 'trusted_cacerts_dir', '');
|
||||
set { $this->set('trusted_cacerts_dir', $value); }
|
||||
@@ -1065,6 +1070,9 @@ class ConfigurationManager
|
||||
'NC_DOMAIN' => $this->domain,
|
||||
'NC_BASE_DN' => $this->getBaseDN(),
|
||||
'AIO_TOKEN' => $this->aioToken,
|
||||
'AIO_LOG_LEVEL' => $this->aioLogLevel,
|
||||
'COLLABORA_LOG_LEVEL' => $this->getCollaboraLogLevel(),
|
||||
'ELASTIC_LOG_LEVEL' => $this->getElasticLogLevel(),
|
||||
'BORGBACKUP_REMOTE_REPO' => $this->borgRemoteRepo,
|
||||
'BORGBACKUP_MODE' => $this->backupMode,
|
||||
'AIO_URL' => $this->aioUrl,
|
||||
@@ -1112,6 +1120,22 @@ class ConfigurationManager
|
||||
default => $this->getRegisteredSecret($placeholder),
|
||||
};
|
||||
}
|
||||
|
||||
private function getCollaboraLogLevel() : string {
|
||||
return match ($this->aioLogLevel) {
|
||||
'warn' => 'warning',
|
||||
default => $this->aioLogLevel,
|
||||
};
|
||||
}
|
||||
|
||||
private function getElasticLogLevel() : string {
|
||||
return match ($this->aioLogLevel) {
|
||||
'debug' => 'DEBUG',
|
||||
'info' => 'INFO',
|
||||
'error' => 'ERROR',
|
||||
default => 'WARN',
|
||||
};
|
||||
}
|
||||
|
||||
private function booleanize(mixed $value) : bool {
|
||||
return in_array($value, [true, 'true'], true);
|
||||
|
||||
Reference in New Issue
Block a user