| … | |
… | |
| 650 | # |
650 | # |
| 651 | # We'll want to remove this in final versions of WeBWorK. |
651 | # We'll want to remove this in final versions of WeBWorK. |
| 652 | |
652 | |
| 653 | sub log_error { |
653 | sub log_error { |
| 654 | my ($comment, $data) = @_; |
654 | my ($comment, $data) = @_; |
| 655 | my $accessLog = convertPath("${webworkLogsDirectory}access_log"); |
655 | # my $accessLog = convertPath("${webworkLogsDirectory}access_log"); |
| 656 | my $errorLog = convertPath("${webworkLogsDirectory}error_log"); |
656 | my $errorLog = convertPath("${webworkLogsDirectory}error_log"); |
| 657 | open(ACCESS, ">>$accessLog"); |
657 | # open(ACCESS, ">>$accessLog"); |
| 658 | open(ERROR, ">>$errorLog"); |
658 | open(ERROR, ">>$errorLog"); |
| 659 | print ACCESS "ERROR ($comment) ", scalar(localtime), ': ', &shortmess($data); |
659 | # print ACCESS "ERROR ($comment) ", scalar(localtime), ': ', &shortmess($data); |
| 660 | print ERROR "ERROR ($comment) ", scalar(localtime), ': ', &shortmess($data); |
660 | print ERROR "ERROR ($comment) ", scalar(localtime), ': ', &shortmess($data); |
| 661 | close(ACCESS); |
661 | # close(ACCESS); |
| 662 | close(ERROR); |
662 | close(ERROR); |
| 663 | } |
663 | } |
| 664 | |
664 | |
| 665 | sub log_info { |
665 | sub log_info { |
| 666 | if( $Global::logAccessData == 1 ) { |
666 | if( $Global::logAccessData == 1 ) { |