mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-30 10:33:42 +00:00
Merge cd6b0f4f7d
into 354cea09a7
This commit is contained in:
commit
8c5cd63f07
@ -31,6 +31,10 @@ timezone = "UTC"
|
||||
; Display a system message to users.
|
||||
;message = "Hello world"
|
||||
|
||||
; Where to store logs and at which level (debug, info, warning, error)
|
||||
;log_file_path = "/tmp/rss-bridge.log"
|
||||
;log_file_level = "info"
|
||||
|
||||
; Whether to enable debug mode.
|
||||
enable_debug_mode = false
|
||||
|
||||
|
@ -52,8 +52,12 @@ $container['logger'] = function () {
|
||||
} else {
|
||||
$logger->addHandler(new ErrorLogHandler(Logger::INFO));
|
||||
}
|
||||
// Uncomment this for info logging to fs
|
||||
// $logger->addHandler(new StreamHandler('/tmp/rss-bridge.txt', Logger::INFO));
|
||||
$path = Configuration::getConfig('system', 'log_file_path');
|
||||
$level = Configuration::getConfig('system', 'log_file_level');
|
||||
if ($path && $level) {
|
||||
$level = array_flip(Logger::LEVEL_NAMES)[strtoupper($level)];
|
||||
$logger->addHandler(new StreamHandler($path, $level));
|
||||
}
|
||||
|
||||
// Uncomment this for debug logging to fs
|
||||
// $logger->addHandler(new StreamHandler('/tmp/rss-bridge-debug.txt', Logger::DEBUG));
|
||||
|
Loading…
Reference in New Issue
Block a user