Skip to content

Commit

Permalink
Change log file permissions (#1333)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpalmer committed Jun 11, 2020
1 parent 53c2668 commit f611529
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/CCR/Log.php
Expand Up @@ -44,6 +44,8 @@ private function __construct()
* - console => False for no console logging.
* - file => File name for file logger or false for no
* file logging.
* - mode => File permissions mode (default 0660).
* - dirmode => Directory permissions mode (default 0770).
* - db => False for no database logging.
* - mail => False for no email logging.
* - emailTo => Mail logger recipient.
Expand Down Expand Up @@ -170,9 +172,13 @@ protected static function getFileLogger($ident, array $conf)
: LOG_DIR . '/' . strtolower(preg_replace('/\W/', '_', $ident))
. '.log';

$conf['mode'] = isset($conf['mode']) ? $conf['mode'] : 0660;
$conf['dirmode'] = isset($conf['dirmode']) ? $conf['dirmode'] : 0770;

$fileConf = array(
'append' => true,
'mode' => 0644,
'mode' => $conf['mode'],
'dirmode' => $conf['dirmode'],
'lineFormat' => $conf['lineFormat'],
'timeFormat' => $conf['timeFormat'],
);
Expand Down

0 comments on commit f611529

Please sign in to comment.