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