Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Logging Access and Error logs in to one Log file |
|
Author |
|
imkh
Joined: 09 May 2011 Posts: 1
|
Posted: Mon 09 May '11 19:50 Post subject: Logging Access and Error logs in to one Log file |
|
|
Hi,
I'm in very strange situation. I want to Log all access and error logs into one Log file. For that I changed httpd.conf file with below modification :-
CustomLog "| /apache20_ptl_sm/bin/rotatelogs -l /apache20_ptl_sm/logs/combo_log_%Y_%b_%d_%H_%M.arc 86400" combined
ErrorLog "| /apache20_ptl_sm/bin/rotatelogs -l /apache20_ptl_sm/logs/combo_log_%Y_%b_%d_%H_%M.arc 86400"
And then I restarted apache server. I thought apache will log both access and error logs in to combo log file. But apache is still creating Access and Error log files and logging all necessary information. When I looked into what is going on in Combo log, I saw apache's internal logging information like status-check and all.
I've checked my httpd.conf file, nothing wrong with it. I'm not able to understand why Apache is creating Access and Error log file and logging into it?
Thanks |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 14 Jul '11 21:00 Post subject: |
|
|
AFAIK you can't use one log file for both.
For disabling the log I did this trick to send the data into nirvana
Code: |
#ErrorLog c:/logs/sandbox.error.log
#CustomLog /server2/logs/sandbox.access.log common
CustomLog C:/nul common
|
C:/nul is mostly the same like /dev/nul on linux |
|
Back to top |
|
|
|
|
|
|