Fix Logger exception: gracefully handle permission issue (#1954)

This commit is contained in:
ArthurHoaro 2023-03-18 12:13:48 -04:00 committed by GitHub
parent b858332f9f
commit 8cd369aee7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@
} }
$logger = new Logger( $logger = new Logger(
dirname($conf->get('resource.log')), is_writable($conf->get('resource.log')) ? dirname($conf->get('resource.log')) : 'php://temp',
!$conf->get('dev.debug') ? LogLevel::INFO : LogLevel::DEBUG, !$conf->get('dev.debug') ? LogLevel::INFO : LogLevel::DEBUG,
['filename' => basename($conf->get('resource.log'))] ['filename' => basename($conf->get('resource.log'))]
); );