added support for logrotate, fox #5
This commit is contained in:
parent
70776ac21f
commit
db9a0a6d8c
@ -15,14 +15,19 @@ class Roastmonday extends APnutI
|
||||
|
||||
public function __construct($config, $pics_root = "", $app_name = 'Roastmonday')
|
||||
{
|
||||
$log_path = $config['log_file'] ?? __DIR__ . '/../logs/roastmonday.log';
|
||||
$use_logrotate = $config['use_logrotate'] ?? false;
|
||||
parent::__construct(
|
||||
$config['client_secret'],
|
||||
$config['client_id'],
|
||||
$config['scope'],
|
||||
$app_name,
|
||||
$config['redirect_url'],
|
||||
__DIR__ . '/../logs/roastmonday.log',
|
||||
'DEBUG'
|
||||
$log_path,
|
||||
$config['log_level'],
|
||||
use_rotating_file_handler: !$use_logrotate,
|
||||
use_stream_handler: $use_logrotate,
|
||||
use_syslog_handler: false
|
||||
);
|
||||
$this->logger->info("App: {$this->app_name}");
|
||||
$this->pics_root = $pics_root . 'pics/';
|
||||
|
Loading…
x
Reference in New Issue
Block a user