Definition at line 312 of file Logger.h. References LOG_DEBUG, LogString(), mErrorLog, mLineStarted, mLog, mLogFile, mLogToFile, mPLog, mShowLevel, and mTimer. Referenced by Configure(). 00313 { 00314 mLineStarted = false; 00315 mTimer = new Timer(1); 00316 // mActionTimer = new Timer(1); 00317 mShowLevel = logLevel; 00318 mLogFile = logFile; 00319 mLogToFile = !mLogFile.empty(); 00320 if (debug) 00321 mShowLevel = LOG_DEBUG; 00322 00323 std::ostringstream s; 00324 s << "Logger started @ level " << mShowLevel; 00325 00326 if (mLogToFile) 00327 { 00328 mLog = new std::fstream(mLogFile.c_str(), 00329 std::ios::out | std::ios::app); 00330 } 00331 else 00332 { 00333 mLog = 0; 00334 } 00335 mPLog = 0; 00336 std::cout << "before error.log" << std::endl; 00337 mErrorLog = new std::fstream("errors.log", std::ios::out | std::ios::app); 00338 if(!mErrorLog->is_open()) 00339 { 00340 std::cerr << "ERROR [LogSystem.h] failed to open errors.log for" 00341 << " writing." << std::endl; 00342 exit(1); 00343 } 00344 std::cout << "past error.log" << std::endl; 00345 LogString(s.str()); 00346 }
Here is the call graph for this function: ![]()
|