Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8775 for code/branches/output


Ignore:
Timestamp:
Jul 25, 2011, 12:01:30 AM (13 years ago)
Author:
landauf
Message:

fixed problem with static initialization in old implementation of the log file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/util/OutputHandler.cc

    r8729 r8775  
    4646namespace orxonox
    4747{
    48     //! How the log file shall be named on the filesystem
    49     const std::string logFileBaseName_g = "orxonox.log";
    50 
    5148    /////////////////////////
    5249    ///// LogFileWriter /////
     
    7168            : OutputListener("LogFile")
    7269        {
     70            this->logFileBaseName_ = "orxonox.log";
     71
    7372            // Get path for a temporary file
    7473#ifdef ORXONOX_PLATFORM_WINDOWS
    7574            char* pTempDir = getenv("TEMP");
    76             this->logFilename_ = std::string(pTempDir) + '/' + logFileBaseName_g;
     75            this->logFilename_ = std::string(pTempDir) + '/' + this->logFileBaseName_;
    7776#else
    78             this->logFilename_ = std::string("/tmp/") + logFileBaseName_g;
     77            this->logFilename_ = std::string("/tmp/") + this->logFileBaseName_;
    7978#endif
    8079
     
    110109
    111110            // Open the new file
    112             this->logFilename_ = path + logFileBaseName_g;
     111            this->logFilename_ = path + this->logFileBaseName_;
    113112            this->openFile();
    114113        }
     
    138137        }
    139138
    140         std::ofstream logFile_;     //!< File handle for the log file
    141         std::string   logFilename_; //!< Filename of the log file
     139        std::ofstream logFile_;         //!< File handle for the log file
     140        std::string   logFilename_;     //!< Filename of the log file
     141        std::string   logFileBaseName_; //!< How the log file shall be named on the filesystem
    142142    };
    143143
Note: See TracChangeset for help on using the changeset viewer.