Log Message:
-----------
Additional changes to the writeLogs functions. Now surePathToFile
is used to make sure that the logs are created if they are not
already there.
Modified Files:
--------------
webwork-modperl/lib/WeBWorK:
Utils.pm
Revision Data
-------------
Index: Utils.pm
===================================================================
RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/Utils.pm,v
retrieving revision 1.63
retrieving revision 1.64
diff -Llib/WeBWorK/Utils.pm -Llib/WeBWorK/Utils.pm -u -r1.63 -r1.64
--- lib/WeBWorK/Utils.pm
+++ lib/WeBWorK/Utils.pm
@@ -545,6 +545,7 @@
return;
}
my $logFile = $ce->{webworkFiles}->{logs}->{$facility};
+ surePathToFile($ce->{webworkDirs}->{root}, $logFile);
local *LOG;
if (open LOG, ">>", $logFile) {
print LOG "[", time2str("%a %b %d %H:%M:%S %Y", time), "] @message\n";
@@ -561,6 +562,7 @@
return;
}
my $logFile = $ce->{courseFiles}->{logs}->{$facility};
+ surePathToFile($ce->{courseDirs}->{root}, $logFile);
local *LOG;
if (open LOG, ">>", $logFile) {
print LOG "[", time2str("%a %b %d %H:%M:%S %Y", time), "] @message\n";
@@ -580,7 +582,6 @@
# [formatted date & time ] processID unixTime BeginEnd $function $details
sub writeTimingLogEntry($$$$) {
my ($ce, $function, $details, $beginEnd) = @_;
- return unless defined $ce->{webworkFiles}->{logs}->{timing};
$beginEnd = ($beginEnd eq "begin") ? ">" : ($beginEnd eq "end") ? "<" : "-";
writeLog($ce, "timing", "$$ ".time." $beginEnd $function [$details]");
}
|