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

Re: [MacPerl] is there a logging module available?



At 14.09 -0400 1999.04.21, Vicki Brown wrote:
>At 12:59 -0400 4/17/99, Chris Nandor wrote:
>> At 08.51 -0400 1999.04.16, Stéphane Jose wrote:
>>>In what I am trying to achieve, several asynchronous requests to my cgi
>>>script will be logged in one single text file. I am looking for a solution
>>>that does not rely on any system calls that are not cross platform.
>>>
>>>Does anyone know of an already made solution?
>>
>> There is no good cross-platform way to do it that I know of.  You would
>> need to rely on a separate process (syslogd) or use file locking, to make
>> sure that the process don't bump heads.
>
>In terms of cross-platform file locking (as all Perl's don't support flock)
>consider using semaphore files. If you're not experienced with file locking
>using semaphore files, take a look at Mark-Jason Dominuis' tutorial at
>http://www.plover.com/~mjd/perl/TPC/1998/Hardware-notes.html#Semaphore_Files

Well, the idea behind using the semaphore file is that you can flock the
semaphore file.  You still can't do that in MacPerl.  You can check for the
existence of a file instead, and unlink the file when you are done, but if
one process for some reason does not unlink it, you're in trouble.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org