This commit is contained in:
@ -2,7 +2,7 @@ notification:
|
||||
- type: Ntfy
|
||||
domain: https://ntfy.jcktrue.dk
|
||||
topic: backup
|
||||
log: output.log
|
||||
log: output.log
|
||||
rclone:
|
||||
options:
|
||||
bwlimit: 6M
|
||||
|
@ -53,7 +53,7 @@ class App
|
||||
function (string $path): bool {
|
||||
return touch($path);
|
||||
}
|
||||
)->required(),
|
||||
),
|
||||
'templates' => Expect::structure(['notify' => Expect::string()])
|
||||
]);
|
||||
|
||||
@ -61,12 +61,13 @@ class App
|
||||
$parsedConfig = $parser->parseFile($configFile);
|
||||
|
||||
|
||||
// Merge those values into your configuration schema:
|
||||
// Merge those values into the configuration schema:
|
||||
$this->config->merge($parsedConfig);
|
||||
|
||||
$logger = new Logger('app');
|
||||
if ($this->config->get('log')) {
|
||||
$logger->pushHandler(new StreamHandler($this->config->get('log')));
|
||||
$logger->info("Logging enabled");
|
||||
}
|
||||
$logger->info("Initialization complete");
|
||||
|
||||
@ -81,7 +82,9 @@ class App
|
||||
*/
|
||||
public function getConfig(string $key): mixed
|
||||
{
|
||||
return $this->config->get($key);
|
||||
$ret = $this->config->get($key);
|
||||
$this->logger->debug("Fetching configuration key",[$key,$ret]);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user