RE: [users@httpd] logging from cgi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can use syslog too. Anyway if you want make cgi.1, cgi.2 ... files, you need logrotate.
(at least i think :))

On Tue, 21 Jun 2005, Michael D. Berger wrote:

Very interesting.  Do you think that it is better
than syslog for my purpose?
Thanks,
Mike.
--
Michael D. Berger
m.d.berger@xxxxxxxx

-----Original Message-----
From: Bohumil Holubec [mailto:bozek@xxxxxxx]
Sent: Monday, June 20, 2005 10:33 PM
To: users@xxxxxxxxxxxxxxxx
Subject: RE: [users@httpd] logging from cgi


files cgi, cgi.1, cgi.2 ... can be create by logrotate daemon (man
logrotate)
In /etc/logrotate.conf or rather /etc/logrotate.d/mycgi you
can write for
example:
/var/log/cgi {
         rotate 10
         weekly
         compress
         missingok
}




On Mon, 20 Jun 2005, Michael D. Berger wrote:

I quote from the Apacle 2.0 ScriptLog:

  Note that script logging is meant to be a debugging
  feature when writing CGI scripts, and is not meant
  to be activated continuously on running servers. It
  is not optimized for speed or efficiency, and may
  have security problems if used in a manner other
  than that for which it was designed.

Now I would like to log certain specific aspects of my
cgi activity on a "continuously running server".  Perhaps
I should just open a file and write to it?  This is how I
have been debugging. On the other, I like the files:
cgi, cgi.1, cgi.2, etc. that I think syslog will
generate.

Further suggestions much appreciated.
Mike.

--
Michael D. Berger
m.d.berger@xxxxxxxx

-----Original Message-----
From: Boyle Owen [mailto:Owen.Boyle@xxxxxxx]
Sent: Monday, June 20, 2005 4:21 AM
To: users@xxxxxxxxxxxxxxxx
Subject: RE: [users@httpd] logging from cgi


-----Original Message-----
From: Michael D. Berger [mailto:m.d.berger@xxxxxxxx]
Sent: Samstag, 18. Juni 2005 21:25
To: Apache-Users
Subject: [users@httpd] logging from cgi


In order to get logging from my cgi I proceeded as shown
below.  Is this correct?  It did not seem to be working
all of the time, but I am not sure.

You might like to try apache's built in ScriptLog (see docs
for details) rather than messing around with syslog...
(syslog is for logging system processes. Apache is an application).

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.


In syslog.conf:
   local0.*           /var/log/httpd/cgi

In c++ cgi:
   openlog("cgi",LOG_PID|LOG_NDELAY|LOG_NOWAIT,LOG_LOCAL0);
   syslog(LOG_INFO,"entered");
   closelog();

Thanks,
Mike.
--
Michael D. Berger
m.d.berger@xxxxxxxx




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux