如何重定向 xampp apache 日志按钮
How to redirect xampp apache log button
我在httpd.conf
中设置每天error.log和access.log
ErrorLog "|D:/xampp/apache/bin/rotatelogs.exe D:/xampp/apache/logs/error%y_%m_%d.log 86400 480"
CustomLog "|D:/xampp/apache/bin/rotatelogs.exe D:/xampp/apache/logs/access%y_%m_%d.log 86400 480" combined
如何打开今天的日志:access21_02_23.log 当我点击 xampp 面板上的日志按钮时?
为文件创建硬链接。
hardlink.bat
set dd=%date:~8,2%
set dm=%date:~5,2%
set dy=%date:~2,2%
set mydate=%dy%_%dm%_%dd%
del D:\xampp\apache\logs\access.log
mklink /H D:\xampp\apache\logs\access.log D:\xampp\apache\logs\access%mydate%.log
del D:\xampp\apache\logs\error.log
mklink /H D:\xampp\apache\logs\error.log D:\xampp\apache\logs\error%mydate%.log
我在httpd.conf
中设置每天error.log和access.logErrorLog "|D:/xampp/apache/bin/rotatelogs.exe D:/xampp/apache/logs/error%y_%m_%d.log 86400 480"
CustomLog "|D:/xampp/apache/bin/rotatelogs.exe D:/xampp/apache/logs/access%y_%m_%d.log 86400 480" combined
如何打开今天的日志:access21_02_23.log 当我点击 xampp 面板上的日志按钮时?
为文件创建硬链接。
hardlink.bat
set dd=%date:~8,2%
set dm=%date:~5,2%
set dy=%date:~2,2%
set mydate=%dy%_%dm%_%dd%
del D:\xampp\apache\logs\access.log
mklink /H D:\xampp\apache\logs\access.log D:\xampp\apache\logs\access%mydate%.log
del D:\xampp\apache\logs\error.log
mklink /H D:\xampp\apache\logs\error.log D:\xampp\apache\logs\error%mydate%.log