diff --git a/library/think/log/driver/File.php b/library/think/log/driver/File.php index 6c61a9a1..fa84ac1a 100644 --- a/library/think/log/driver/File.php +++ b/library/think/log/driver/File.php @@ -81,6 +81,8 @@ class File // 独立记录的日志级别 if ($this->config['single']) { $filename = $path . DS . $type . '.log'; + } elseif ($this->config['max_files']) { + $filename = $path . DS . date('Ymd') . '_' . $type . $cli . '.log'; } else { $filename = $path . DS . date('d') . '_' . $type . $cli . '.log'; }