[thelist] customlog thing from last night

John Handelaar genghis at members.evolt.org
Tue Apr 30 11:42:08 CDT 2002


#!/usr/bin/perl
use strict;
my $line;
open(FILE, ">>test.log");
$line = <STDIN>;
print FILE $line;
close FILE;

This one closes the pipe at the end of each line
of input, meaning you get a new process wach time
a write event happens, instead of trying to leave
the log open - which (this is a guess) causes
the second write to attempt opening a new
process, see a locked logfile and abort.

Kudos to simon at userfrenzy.com for assistance,
if it works :-)

Bear in mind that on a heavy server this could slow
down your Apache badly, cos it's closing and opening
the file each and every time it sees a \n ...

genghis

------------------------------------------
John Handelaar

T +44 20 7209 4117       M +44 7930 681789
F +44 870 169 7657   E john at userfrenzy.com
------------------------------------------

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Morbus Iff
> Sent: 24 April 2002 01:13
> To: thelist at lists.evolt.org
> Subject: [thelist] Apache Web-Serving with OS X, Part #5 Available
>
>
> Hey all. My sixth Apache / OS X / O'Reilly article is now available.
>
>  "Following the first five Apache Web-Serving with Mac OS X [1] articles
>  Kevin Hemenway (aka Morbus Iff) returns with a "put your legs up" sixth
>  tutorial [2]. This time he walks you through the various Apache modules
>  that come with your Mac OS X installation and shows you what
> they can do."
>
> [1] http://www.oreillynet.com/pub/ct/49
> [2] http://www.oreillynet.com/pub/a/mac/2002/04/23/apache_six.html
>
> --
> Morbus Iff ( were you a community theatre satan? )
> Culture: http://www.disobey.com/ and http://www.gamegrene.com/
> Tech: http://www.oreillynet.com/pub/au/779 - articles and weblog
> icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>



More information about the thelist mailing list