Solved

Who knows cronolog inside and out?

Posted on 2004-07-31
5
340 Views
Last Modified: 2010-03-04
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

0
Comment
Question by:ricbax
  • 2
5 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11687584
>  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
0
 
LVL 3

Author Comment

by:ricbax
ID: 11699559
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
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 11701553
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?

Example:
  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
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now