On Mon, 10 Jun 2002, Bill Moseley wrote:
You are correct to worry. You should use flock() to prevent your log file
from becoming corrupted. See perldoc -f flock() for more details.
Maybe it's a matter of volume. Or size of string written to the log. But
I don't flock, and I keep the log
On Mon, 10 Jun 2002, Tom Brown wrote:
?? AFAIK, Files opened in append mode, and written to without buffering,
should _not_ get corrupted in any manner that flock would prevent.
(basically small writes should be atomic.)
Right, and does Perl write with buffering when you call print()? Yes,
On Tue, 11 Jun 2002, Sam Tregar wrote:
On Mon, 10 Jun 2002, Tom Brown wrote:
?? AFAIK, Files opened in append mode, and written to without buffering,
should _not_ get corrupted in any manner that flock would prevent.
(basically small writes should be atomic.)
Right, and does Perl
On Tue, 11 Jun 2002, Tom Brown wrote:
Right, and does Perl write with buffering when you call print()? Yes, it
does!
huh? That's what $| is all about, and $|++ is a pretty common line of
code.
A pretty common line of code that wasn't in the example shown! And that
only unbuffers the
Hello!
I'm working on mod_perl project and I worry about logging. I don't like to
log to Apache's error log. I want to log to file.
open(ERRORLOG, '/var/log/my_log');
print ERRORLOG some text\n;
close ERRORLOG;
This bit of code runs in every apache child.
I worry abount concurent access to this
On Tue, 11 Jun 2002, Sergey Rusakov wrote:
open(ERRORLOG, '/var/log/my_log');
print ERRORLOG some text\n;
close ERRORLOG;
This bit of code runs in every apache child.
I worry abount concurent access to this log file under heavy apache load. Is
there any problems on my way?
You are
On Mon, 10 Jun 2002, Sam Tregar wrote:
You are correct to worry. You should use flock() to prevent your log file
from becoming corrupted. See perldoc -f flock() for more details.
Gah, these fingers... That should be perldoc -f flock.
-sam
At 10:30 PM 06/10/02 -0400, Sam Tregar wrote:
On Tue, 11 Jun 2002, Sergey Rusakov wrote:
open(ERRORLOG, '/var/log/my_log');
print ERRORLOG some text\n;
close ERRORLOG;
This bit of code runs in every apache child.
I worry abount concurent access to this log file under heavy apache
load. Is
From: Sergey Rusakov [EMAIL PROTECTED]
open(ERRORLOG, '/var/log/my_log');
print ERRORLOG some text\n;
close ERRORLOG;
This bit of code runs in every apache child.
I worry abount concurent access to this log file under heavy apache load. Is
there any problems on my way?
This is OS