public function __construct(string $baseDirectory = '', string $logfileFormat = self::FILE_FORMAT, string $timeFormat = self::TIME_FORMAT)
{
if (Binary::safeStrlen($baseDirectory) < 2) {
$this->basedir = ROOT . '/tmp/logs/';
} else {
$this->basedir = $baseDirectory;
}
if (!\is_dir($this->basedir)) {
\mkdir($this->basedir, 0775);
}
$this->fileFormat = $logfileFormat;
$this->timeFormat = $timeFormat;
}