Hi I have tested 2.2.3, 2.2.4 and 2.2.6 with following directive on WindowsXP. ----- ErrorLog "| c:/apache2/bin/rotatelogs.exe c:/apache2/logs/%Y%m%d_error.log 86400" ----- Somehow I can't start 2.2.4 httpd.exe from tray icon. ------2.2.3 : Server starts 2.2.4 : Server starts when executed directory from httpd.exe (not from tray icon)
2.2.6 : Server starts ------ Also, I have traced how ErrorLog directive handles "| rotatelogs.exe" line.When "|" is found, httpd.exe creates NamedPipe and executes rotatelogs.exe from cmd.exe. At this point, output and input are changed like, ------
httpd.exe -> (NamedPipe) -> rotatelogs.exe (-> error.log) ------ In addition, by using Windows Process Monitor, I have found rotatelogs.exe is writing to the current error.log file, but not old error.log file. rotatelogs.exe is really suspicious to me. Any help are appreciated. I would like to delete old error.log files without stopping Apache Regards, Kenji Kikuchi sniedermeyer@xxxxxxx wrote:
I've been trying to figure out how to rotate the error log in a Windows environment. I'm rotating the access logs in the vhost config file as follows: <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> CustomLog logs/cob/access-log-%Y-%m-%d.log combined </IfModule> <IfModule log_rotate_module> RotateLogs On RotateLogsLocalTime On RotateInterval 86400 </IfModule> And I'm successfully logging errors by configuring the http.conf file as follows: LogLevel info ErrorLog c:/apache2/logs/error.log However, I'm unclear how to rotate the error logs. I tried using this directive but the server wouldn't restart. I couldn't refer to the error log to see what might be wrong with this directive because it applies to the error log: ErrorLog "| c:/apache2/bin/rotatelogs.exe c:/apache2/logs/%Y%m%d_error.log 86400" If someone could point me in the right direction I'd appreciate it. Thanks ____________________________ StevenKenji Kikuchi <kenji.kikuti@ctc -g.co.jp> To users@xxxxxxxxxxxxxxxx 11/30/2007 01:03 cc AM Subject Apache 2.2.3 Please respond to rotatelogs.exe on WindowsXP users@xxxxxxxxxxx e.orgHi All I have installed apache2.2.3 on Windows XP and am using rotatelogs.exe for ErrorLog directive like httpd.conf --------------- ErrorLog "| C:/test/logs/rotatelogs.exe C:/test/logs/%Y%m%d_error.log 86400" --------------- Regards, Kenji Kikuchi --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx