Link to home
Start Free TrialLog in
Avatar of ricbax
ricbax

asked on

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

Avatar of ahoffmann
ahoffmann
Flag of Germany image

>  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
Avatar of ricbax
ricbax

ASKER

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.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial