Example #1
0
void NewLog::InitializeLogging( std::string logPath )
{
    // open default logfile
    if( logPath.empty() )
        logPath = EVEMU_ROOT "/log/";

    m_initialized = true;

    SetLogfileDefault(logPath);

    Debug( "Log", "Log system initiated" );
}
Example #2
0
void SysLog::InitializeLogging(std::string logPath)
{
    mLogfile = nullptr;
    mTime = 0;
#ifdef HAVE_WINDOWS_H
    mStdOutHandle = GetStdHandle(STD_OUTPUT_HANDLE);
    mStdErrHandle = GetStdHandle(STD_ERROR_HANDLE);
#endif /* HAVE_WINDOWS_H */

    // open default logfile
    if( logPath.empty() )
        logPath = EVEMU_ROOT "/log/";

    m_initialized = true;

    SetLogfileDefault(logPath);

    Debug( "Log", "Log system initiated" );
}
Example #3
0
void Basic_Log::InitializeLogging(std::string logPath, std::string logSubdirectory, std::string logFilename)
{
    // use default logpath if logPath is empty
    if( logPath.empty() )
        logPath = EVEMU_ROOT "/log/";

	if( logFilename.empty() )
		logFilename = "name_your_log_file.log";

	if( !(logSubdirectory.empty()) )
		CreateDirectory( (logPath + logSubdirectory).c_str(), NULL );

	mLogPath = logPath + logSubdirectory + "/";
	mLogFilename = logFilename;

    m_initialized = true;

	SetLogfileDefault(mLogPath + mLogFilename);

    Debug( "Log", "Log system initiated" );
}