9 #include "fei_LogFile.hpp"
10 #include "fei_iostream.hpp"
11 #include "fei_fstream.hpp"
12 #include "fei_sstream.hpp"
15 fei::LogFile::LogFile()
33 std::string pathstr(
"./");
38 if (pathstr[pathstr.size()] !=
'/') {
39 pathstr = pathstr+
"/";
42 FEI_OSTRINGSTREAM osstr;
43 osstr << pathstr <<
"fei_log."<<counter_<<
"."<<nprocs<<
"."<<localproc;
44 std::string filename = osstr.str();
48 output_stream_ =
new FEI_OFSTREAM(filename.c_str(), IOS_OUT);
50 if (output_stream_ == NULL || output_stream_->bad()) {
51 fei::console_out() <<
"couldn't open debug output file: " << filename << FEI_ENDL;
52 delete output_stream_;
59 return( output_stream_ );
64 delete output_stream_;
void openOutputStream(const char *path=NULL, int nprocs=1, int localproc=0)
FEI_OSTREAM * getOutputStream()
std::ostream & console_out()
static LogFile & getLogFile()