Issue
I set daily error.log and access.log in httpd.conf
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
How can I open today's log: access21_02_23.log when I click log button at xampp panel?
Solution
Create the hardlink for the file.
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
Answered By - AllenBooTung Answer Checked By - Pedro (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.