[system] / trunk / webwork-modperl / lib / WeBWorK / Debug.pm Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/lib/WeBWorK/Debug.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2372 Revision 2861
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/Debug.pm,v 1.1 2004/06/23 00:37:18 sh002i Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/Debug.pm,v 1.2 2004/06/23 19:19:02 sh002i Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
93 my ($package, $filename, $line, $subroutine) = caller(1); 93 my ($package, $filename, $line, $subroutine) = caller(1);
94 return if defined $QuellSubroutineOutput and $subroutine =~ m/$QuellSubroutineOutput/; 94 return if defined $QuellSubroutineOutput and $subroutine =~ m/$QuellSubroutineOutput/;
95 95
96 my $finalMessage = "$subroutine: " . join("", @message); 96 my $finalMessage = "$subroutine: " . join("", @message);
97 $finalMessage .= "\n" unless $finalMessage =~ m/\n$/; 97 $finalMessage .= "\n" unless $finalMessage =~ m/\n$/;
98 98 $finalMessage = "[" . time2str("%a %b %d %H:%M:%S %Y", time) . "] " .$finalMessage;
99 if ($WeBWorK::Debug::Logfile ne "") { 99 if ($WeBWorK::Debug::Logfile ne "") {
100 if (open my $fh, ">>", $Logfile) { 100 if (open my $fh, ">>", $Logfile) {
101 print $fh $finalMessage; 101 print $fh $finalMessage;
102 close $fh; 102 close $fh;
103 } else { 103 } else {

Legend:
Removed from v.2372  
changed lines
  Added in v.2861

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9