mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-30 14:49:53 +02:00
fix: introduce system env var, remove debug mode (#4658)
* fix: introduce system env var * docs * docs
This commit is contained in:
parent
a128c05a97
commit
81ce9c9483
12 changed files with 55 additions and 95 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue