Who knows cronolog inside and out?

I am trying to setup cronolog for my apache 1.3.31server. I have 3 vhosts and want to set them all up to rotate individually. To do a test run I have tried to setup only one of the vhosts. I followed the instructions that are provided on the developers site but apache says "noway buddy" and I should run a configtest then it tells me this:

Syntax error on line 1085 of /usr/local/apache/conf/httpd.conf:
CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" clause (see docs)

This is what I have in my 1st vhost and this is where the lines of error occur.

 1083 ErrorLog logs/mydomainname_error_log
 1084 CustomLog logs/mydomainname_access_log combined
 1085 CustomLog "|/usr/local/sbin/cronolog --delay "2 hours" /www/mydomainname/logs/%Y/%m-%d-mydomainname-access.log"
  1086 ErrorLog  "|/usr/local/sbin/cronolog --delay "2 hours" /www/mydomainname/logs/%Y/%m-%d-mydomainname-errors.log

What's the problem? :-S

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

ahoffmannConnect With a Mentor Commented:
the format string is a pattern with variables (%+character) which specifies how the log entry shoul be formated
the format name is the name of such a format string, obvious, isn't it?
and the env= clause is a condition when to use this format

Is there any problem in reading apache (httpd.conf in particular) docs?

  LogFormat "%h %l %u %t \"%r\" %>s %b" common
  CustomLog logs/mydomainname_access_log common

hence yours should look like:
   CustomLog "|/usr/local/sbin/cronolog --delay '2 hours' /www/mydomainname/logs/%Y/%m-%d-mydomainname-access.log" common
>  1085 CustomLog "|/usr/local/sbin/cronolog --delay "2 hours"
did you miss the closing double-quote after cronolog?
Or should it look like :

 CustomLog "|/usr/local/sbin/cronolog --delay '2 hours'"

then you need to add at least a format string (as the error says;-)

same applies to line 1086
ricbaxAuthor Commented:
Should have caught the single quotes, but since I like to work late at night i missed it.

However it still gives me the error, and I am not sure what a custom log format string or format name, and an optional "env=" clause is.  Please explain with relation to my situation.

All Courses

From novice to tech pro — start learning today.