More logging.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Jens True 2023-07-04 10:15:34 +00:00
parent 9add013038
commit ea18b8b9b3
2 changed files with 7 additions and 4 deletions

@ -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;
}
/**