コード例 #1
0
ファイル: LogFile.cpp プロジェクト: DerSaidin/DarkRadiant
// 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;
	}
}
コード例 #2
0
ファイル: LogFile.cpp プロジェクト: nbohr1more/DarkRadiant
// 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;
	}
}