20 $logFile = static::DEFAULT_LOG_FILE;
21 if (isset($options[
"file"]) && !empty($options[
"file"]))
23 $logFile = $options[
"file"];
26 if ((substr($logFile, 0, 1) !==
"/") && !preg_match(
"#^[a-z]:/#", $logFile))
28 $logFile = Main\Application::getDocumentRoot().
"/".$logFile;
31 $maxLogSize = static::MAX_LOG_SIZE;
32 if (isset($options[
"log_size"]) && $options[
"log_size"] > 0)
34 $maxLogSize = (int)$options[
"log_size"];
37 $this->logger =
new FileLogger($logFile, $maxLogSize);
39 if (isset($options[
"level"]) && $options[
"level"] > 0)
41 $this->level = (int)$options[
"level"];