tengine的时间变量 $year $month $day等,在定义 access_log error_log路径的时候,reload的时候,如果没有用户访问,直接输出变量一个带单引号的日志文件,例如'www.xxx.com-$year-$month-$day-error.log' ,随后有用户访问的时候显示正常。
日志目录结构如下
├── s2.123-$year-$month-$day-error.log ├── s2.123-2023-11-14-access.log ├── www.xxx.com-$year-$month-$day-error.log ├── www.xxx.com-$year-$month-$day-access.log ├── www.xxx.com-2023-11-11-access.log ├── www.xxx.com-2023-11-12-access.log ├── www.xxx.com-2023-11-13-access.log ├── www.xxx.com-2023-11-14-access.log ├── www.123-$year-$month-$day-error.log ├── www.123-$year-$month-$day-access.log ├── www.123-2023-11-11-access.log ├── www.123-2023-11-12-access.log ├── www.123-2023-11-13-access.log └── www.123-2023-11-14-access.log