John Anderson wrote:
> Hi,
>
> This may or may not be the best forum for this question, but it does
> deal with Analog. I wrote a CGI script that uses Date::Manip to get
> yesterdays date and create the logfile name and location (the rotator I
> use puts them into a yyyy/mm/access_log_yyyymmdd.tar.gz format.)
>
> The last line of the script is a system call, it runs analog with the
> settings for that certain log. Here is the line from the script:
>
> system("/analog-4.04/analog -G -m -d ".
> " +g/logs/analog.conf".
> " logfile $loglocation 1>/dev/null 2>/dev/null");
>
> With the 1>/dev/null and 2>/dev/null I was hoping to get rid of any
> output the command created (other that the Analog report, of course.)
If you are really using this as a CGI script (from a web browser) then you
wouldn't want to "1>/dev/null" or you'd get no report.
> Finally to my question. I am getting a line in my error_logs, when I
> view the web page CGI, that looks like this:
>
> path/to/logs/archive/2000/06/access_log_20000615
>
> When I run the CGI from the command line, I get that message, but it
> appears AFTER my print "Content type: text/html" Which leads me to
> think it should be on the html page.
>
> My questions:
>
> 1. Why is it showing up in my error logs?
Because anything run from a CGI script that is sent to STDERR will go to the
error log.
> 2. Shouldn't it get pumped to /dev/null because of that 2>/dev/null?
Apparently your CGI system is working aroung the redirections (ignoring them)
as you are, I assume, getting some output on your browser.
> 3. Is there something in the config file I can set to stop it from
> printing it in the first place?
I don't think Analog is generating that message. When you run this from the
command line,
/analog-4.04/analog -G -m -d +g/logs/analog.conf logfile $loglocation
do you get that message?
HTH,
Jeremy Wadsack
Wadsack-Allen Digital Group
------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/analog-help@lists.isite.net/
------------------------------------------------------------------------