private function logDir(): string
    {
        $logDir = str_replace(
                '{Y}',
                date('Y'),
                str_replace('{M}', date('m'), $this->logDir)
        );
        if (!file_exists($logDir)) {
            mkdir($logDir, $this->filemode, true);
        }

        return $logDir;
    }
private function logDir(): string
    {
        $logDir = str_replace(
                '{Y}',
                date('Y'),
                str_replace('{M}', date('m'), $this->logDir)
        );
        if (!file_exists($logDir)) {
            mkdir($logDir, $this->filemode, true);
        }

        return $logDir;
    }
private function logDir ( ) : string { $ logDir = str_replace ( '{Y}' , date ( 'Y' ) , str_replace ( '{M}' , date ( 'm' ) , $ this -> logDir ) ) ; if ( ! file_exists ( $ logDir ) ) { mkdir ( $ logDir , $ this -> filemode , true ) ; } return $ logDir ; }
returns directory where to write logfile to

@return  string
returns directory where to write logfile to