?
Solved

Who knows cronolog inside and out?

Posted on 2004-07-31
5
Medium Priority
?
390 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 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