third_party/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
/**
 *  Returns the full path to the machine's log file for an given index.
 */
Returns the full path to the machine's log file for an given index.
Returns the full path to the machine ' s log file for an given index .
Utf8Str Machine::i_getLogFilename(ULONG idx)
{
    Utf8Str logFolder;
    getLogFolder(logFolder);
    Assert(logFolder.length());
    Utf8Str log;
    if (idx == 0)
        log = Utf8StrFmt("%s%cVBox.log", logFolder.c_str(), RTPATH_DELIMITER);
#if defined(RT_OS_WINDOWS) && defined(VBOX_WITH_HARDENING)
    else if (idx == 1)
        log = Utf8StrFmt("%s%cVBoxHardening.log", logFolder.c_str(), RTPATH_DELIMITER);
    else
        log = Utf8StrFmt("%s%cVBox.log.%u", logFolder.c_str(), RTPATH_DELIMITER, idx - 1);
#else
    else
        log = Utf8StrFmt("%s%cVBox.log.%u", logFolder.c_str(), RTPATH_DELIMITER, idx);
#endif
    return log;
}
Utf8Str Machine :: i_getLogFilename ( ULONG idx ) { Utf8Str logFolder ; getLogFolder ( logFolder ) ; Assert ( logFolder . length ( ) ) ; Utf8Str log ; if ( idx == 0 ) log = Utf8StrFmt ( " " , logFolder . c_str ( ) , RTPATH_DELIMITER ) ; #if defined ( RT_OS_WINDOWS ) && defined ( VBOX_WITH_HARDENING ) else if ( idx == 1 ) log = Utf8StrFmt ( " " , logFolder . c_str ( ) , RTPATH_DELIMITER ) ; else log = Utf8StrFmt ( " " , logFolder . c_str ( ) , RTPATH_DELIMITER , idx - 1 ) ; #else else log = Utf8StrFmt ( " " , logFolder . c_str ( ) , RTPATH_DELIMITER , idx ) ; #endif return log ; }
Returns the full path to the machine's log file for an given index.
Returns the full path to the machine ' s log file for an given index .