|
|
Joined: Dec 1999
Posts: 30,867
Master Elite Member
|
LogWrite() - Simple Logging Functionsub LogWrite {
# Purpose
# Used to make an entry in the log specified by the global LogFilespec.
# Parameters
# 1 Msg (String) = The message we want to write to the log.
# Globals
# LogFilespec (String) = The filespec of the log file we're working with.
my $Msg = shift @_;
# Set the delimimter used in log files
my $Delimiter = ' | ';
$TS = &GetTimeStamp; # Get a timestamp
$Entry = $TS . $Delimiter . $Msg; # Build the log entry with leading timestamp
open (LOGFILE, ">>$LogFilespec");
print LOGFILE "\n$Entry";
close (LOGFILE);
}
|
|
|
|
Entire Thread
|
LogWrite() - Simple Logging Function
|
Russ
|
11/25/08 04:43 PM
|
|
|
|