Changeset 514 for trunk/gsdl/src/recpt
- Timestamp:
- 1999-09-02T12:28:42+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/statusaction.cpp
r421 r514 12 12 /* 13 13 $Log$ 14 Revision 1.16 1999/09/02 00:28:42 rjmcnab 15 removed dependancy on GSDL_GSDLHOME 16 14 17 Revision 1.15 1999/07/30 02:24:42 sjboddie 15 18 added collectinfo argument to some functions … … 71 74 72 75 #include "statusaction.h" 76 #include "fileutil.h" 73 77 #include <assert.h> 74 78 … … 583 587 outconvertclass &outconvert, 584 588 ostream &textout, ostream &/*logout*/) { 589 if (recpt == NULL) return; 590 const recptconf &rcinfo = recpt->get_configinfo (); 591 text_t initfilename = filename_cat (rcinfo.gsdlhome, "etc", "initout.txt"); 592 char *cinitfilename = initfilename.getcstr(); 593 if (cinitfilename == NULL) return; 594 585 595 textout << outconvert << disp << "_status:header_(Init log)\n"; 586 596 textout << outconvert << "<h2>Init log</h2>\n"; 587 597 588 ifstream initin (GSDL_GSDLHOME "/etc/initout.txt"); 598 ifstream initin (cinitfilename, ios::in | ios::nocreate); 599 delete cinitfilename; 589 600 if (initin) { 590 601 textout << outconvert << "<p>The initialisation error log, " 591 GSDL_GSDLHOME "/etc/initout.txt, contains the\n";602 << initfilename << ", contains the\n"; 592 603 textout << outconvert << "following information:\n\n"; 593 604 text_t errorpage = "<p><pre>\n"; … … 605 616 606 617 } else { 607 textout << outconvert << "Couldn't read initialisation error log, " GSDL_GSDLHOME "/etc/initout.txt.\n"; 618 textout << outconvert << "Couldn't read initialisation error log, " 619 << initfilename << ".\n"; 608 620 } 609 621 … … 614 626 outconvertclass &outconvert, 615 627 ostream &textout, ostream &logout) { 628 if (recpt == NULL) return; 629 const recptconf &rcinfo = recpt->get_configinfo (); 630 text_t errfilename = filename_cat (rcinfo.gsdlhome, "etc", "errout.txt"); 631 char *cerrfilename = errfilename.getcstr(); 632 if (cerrfilename == NULL) return; 633 616 634 textout << outconvert << disp << "_status:header_(Error log)\n"; 617 635 textout << outconvert << "<h2>Error log</h2>\n"; 618 636 logout << flush; 619 637 620 ifstream errin (GSDL_GSDLHOME "/etc/errout.txt"); 638 ifstream errin (cerrfilename, ios::in | ios::nocreate); 639 delete cerrfilename; 621 640 if (errin) { 622 textout << outconvert << "<p>The error log, " GSDL_GSDLHOME "/etc/errout.txt, contains the\n"; 641 textout << outconvert << "<p>The error log, " 642 << errfilename << ", contains the\n"; 623 643 textout << outconvert << "following information:\n\n"; 624 644 text_t errorpage = "<p><pre>\n"; … … 636 656 637 657 } else { 638 textout << outconvert << "Couldn't read error log, " GSDL_GSDLHOME "/etc/errout.txt.\n"; 658 textout << outconvert << "Couldn't read error log, " 659 << errfilename << ".\n"; 639 660 } 640 661
Note:
See TracChangeset
for help on using the changeset viewer.