VirtualBox

Changeset 94710 in vbox for trunk/src


Ignore:
Timestamp:
Apr 25, 2022 5:26:14 PM (3 years ago)
Author:
vboxsync
Message:

Main/Update check: Docs nits, formatting, logging tweaks. bugref:7983

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/UpdateAgentImpl.cpp

    r94706 r94710  
    9999 * Returns platform information as a string.
    100100 *
    101  * @returns HRESULT
     101 * @returns Platform information as string.
    102102 */
    103103/* static */
     
    233233    }
    234234
    235     LogRelFunc(("strPlatform (Linux) = %s\n", strPlatform.c_str()));
    236 
    237235    if (RT_FAILURE(vrc))
    238236# endif /* RT_OS_LINUX */
     
    259257        if (!strPlatform.endsWith("]"))
    260258            strPlatform.append("]");
    261 
    262         LogRelFunc(("strPlatform = %s\n", strPlatform.c_str()));
    263     }
     259    }
     260
     261    LogRel2(("UpdateAgent: Platform is '%s'\n", strPlatform.c_str()));
    264262
    265263    return strPlatform;
     
    745743    va_start(va, pcszMsgFmt);
    746744
    747      char *psz = NULL;
    748      if (RTStrAPrintfV(&psz, pcszMsgFmt, va) <= 0)
    749          return E_OUTOFMEMORY;
    750 
    751      LogRel(("Update agent (%s): %s\n", mData.m_strName.c_str(), psz));
    752 
    753      ::FireUpdateAgentErrorEvent(m_EventSource, psz, vrc);
    754 
    755      HRESULT const rc = setErrorVrc(VERR_COM_IPRT_ERROR /** @todo Translate HTTP errors to COM? */, pcszMsgFmt, va);
    756 
    757      va_end(va);
    758      RTStrFree(psz);
    759 
    760      return rc;
     745    char *psz = NULL;
     746    if (RTStrAPrintfV(&psz, pcszMsgFmt, va) <= 0)
     747     return E_OUTOFMEMORY;
     748
     749    LogRel(("Update agent (%s): %s\n", mData.m_strName.c_str(), psz));
     750
     751    ::FireUpdateAgentErrorEvent(m_EventSource, psz, vrc);
     752
     753    HRESULT const rc = setErrorVrc(VERR_COM_IPRT_ERROR /** @todo Translate HTTP errors to COM? */, pcszMsgFmt, va);
     754
     755    va_end(va);
     756    RTStrFree(psz);
     757
     758    return rc;
    761759}
    762760
     
    10711069                                   rc, cchWord0, pchWord0, cchWord1, pchWord1);
    10721070
    1073             LogRel(("Update agent (%s): HTTP server replied: %.*s %.*s\n",
    1074                     mData.m_strName.c_str(), cchWord0, pchWord0, cchWord1, pchWord1));
     1071            LogRel2(("Update agent (%s): HTTP server replied: %.*s %.*s\n",
     1072                     mData.m_strName.c_str(), cchWord0, pchWord0, cchWord1, pchWord1));
    10751073        }
    10761074        else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette