经过测试 不适用与liunx版本
配置nginx.conf
在http 里加
map $time_iso8601 $logdate {
'~^(?<ymd>\d{4}-\d{2}-\d{2})' $ymd;
default 'date-not-found';
}
在server里加
access_log \logs\access-$logdate.log;
error_log \logs\error-$logdate.log;
效果如下: