______________________________________________________________________________
Michael P. Vergara Be good and you will be lonesome
Oracle Database Administrator Mark Twain
(951) 914-2000 (Voice)
(951) 914-2990 (FAX)
www.guidant.com
Any views expressed herein are not necessarily those of Guidant Corporation.
-----Original Message-----
From: Stephan Harren
Sent: Wednesday, November 09, 2005 12:37 PM
To: Vergara, Michael (TEM)
Cc: dbi-users@perl.org
Subject: Re: Logging Question
Close the Filehandle and re-open it after each line.
HTH,
Stephan
Hello Everyone:
I have a Perl script that connects to multiple Oracle databases. I
have the script write some status information to
a log file. There is one particular database that hangs in
processing, and I don't know why. The log file does not seem
to be written until the file is closed.
I am wondering, is there a Perl command or technique that will force
lines that are logically written to a log file to be
physically written to that file?
Here's my opening code:
#
#
-------------------------------------------------------------------------
# Open Log file
#
-------------------------------------------------------------------------
my $logFileName = "${HomeDir}/work/monitor/output/logs/db_status.log";
open( LOGF, ">>" . $logFileName ) or die "\nCannot open log file\n\n";
print LOGF "\n----------\n";
print LOGF sprintf("db_status started at %02d-%02d-%04d %02d:%02d:%02d\n",
$Tm->mon+1, $Tm->mday, $Tm->year+1900, $Tm->hour,
$Tm->min, $Tm->sec );
I have a Perl script that connects to multiple Oracle databases. I
have the script write some status information to
a log file. There is one particular database that hangs in
processing, and I don't know why. The log file does not seem
to be written until the file is closed.
I am wondering, is there a Perl command or technique that will force
lines that are logically written to a log file to be
physically written to that file?
Here's my opening code:
#
#
-------------------------------------------------------------------------
# Open Log file
#
-------------------------------------------------------------------------
my $logFileName = "${HomeDir}/work/monitor/output/logs/db_status.log";
open( LOGF, ">>" . $logFileName ) or die "\nCannot open log file\n\n";
print LOGF "\n----------\n";
print LOGF sprintf("db_status started at %02d-%02d-%04d %02d:%02d:%02d\n",
$Tm->mon+1, $Tm->mday, $Tm->year+1900, $Tm->hour,
$Tm->min, $Tm->sec );