PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, July 3, 2022

[FIXED] How to redirect xampp apache log button

 July 03, 2022     xampp     No comments   

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?

enter image description here


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)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing