Solved

Who knows cronolog inside and out?

Posted on 2004-07-31
5
380 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 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 Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

707 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