// Creates the singleton logfile with the given filename void LogFile::create(const std::string& filename) { if (InstancePtr() == NULL) { // No logfile yet, create one InstancePtr() = LogFilePtr(new LogFile(filename)); // Write the initialisation info to the logfile. rMessage() << "Started logging to " << InstancePtr()->_logFilename << std::endl; time_t localtime; time(&localtime); rMessage() << "Today is: " << ctime(&localtime) << "This is " << RADIANT_APPNAME_FULL() << std::endl; // Output the gtkmm version to the logfile std::string gtkVersion = string::to_string(GTKMM_MAJOR_VERSION) + "."; gtkVersion += string::to_string(GTKMM_MINOR_VERSION) + "."; gtkVersion += string::to_string(GTKMM_MICRO_VERSION); rMessage() << "gtkmm Version: " << gtkVersion << std::endl; } }
// Creates the singleton logfile with the given filename void LogFile::create(const std::string& filename) { if (InstancePtr() == NULL) { // No logfile yet, create one InstancePtr() = LogFilePtr(new LogFile(filename)); // Write the initialisation info to the logfile. rMessage() << "Started logging to " << InstancePtr()->_logFilename << std::endl; time_t localtime; time(&localtime); rMessage() << "Today is: " << ctime(&localtime) << "This is " << RADIANT_APPNAME_FULL() << std::endl; // Output the wxWidgets version to the logfile std::string wxVersion = string::to_string(wxMAJOR_VERSION) + "."; wxVersion += string::to_string(wxMINOR_VERSION) + "."; wxVersion += string::to_string(wxRELEASE_NUMBER); rMessage() << "wxWidgets Version: " << wxVersion << std::endl; } }