fix: introduce system env var, remove debug mode (#4658)

* fix: introduce system env var

* docs

* docs
This commit is contained in:
Dag 2025-08-08 01:38:12 +02:00 committed by GitHub
parent a128c05a97
commit 81ce9c9483
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 55 additions and 95 deletions

View file

@ -47,16 +47,16 @@ $container['cache_factory'] = function ($c) {
$container['logger'] = function () {
$logger = new SimpleLogger('rssbridge');
if (Debug::isEnabled()) {
if (Configuration::getConfig('system', 'env') === 'dev') {
$logger->addHandler(new ErrorLogHandler(Logger::DEBUG));
} else {
$logger->addHandler(new ErrorLogHandler(Logger::INFO));
}
// Uncomment this for info logging to fs
// $logger->addHandler(new StreamHandler('/tmp/rss-bridge.txt', Logger::INFO));
// $logger->addHandler(new StreamHandler('/tmp/rss-bridge.log', Logger::INFO));
// Uncomment this for debug logging to fs
// $logger->addHandler(new StreamHandler('/tmp/rss-bridge-debug.txt', Logger::DEBUG));
// $logger->addHandler(new StreamHandler('/tmp/rss-bridge-debug.log', Logger::DEBUG));
return $logger;
};