VirtualBox

Ignore:
Timestamp:
Mar 5, 2019 12:51:42 PM (6 years ago)
Author:
vboxsync
Message:

darwin/VBoxClient: build fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClient.cpp

    r76553 r77565  
    5454 * @return  IPRT status code.
    5555 */
    56 static int vbclInitLogger(char *szLogFileName)
    57 {
    58     int rc;
    59 
    60     uint32_t                   fFlags         = RTLOGFLAGS_PREFIX_THREAD | RTLOGFLAGS_PREFIX_TIME_PROG;
    61     static const char * const  s_apszGroups[] = VBOX_LOGGROUP_NAMES;
    62     uint32_t                   fDestFlags     = RTLOGDEST_STDOUT;
    63 
    64     rc = RTLogCreateEx(&g_pLogger,
    65                        fFlags,                          /* Logger instance flags, a combination of the RTLOGFLAGS_* values */
    66                        "all",                           /* The initial group settings */
    67                        "VBOXCLIENT_RELEASE_LOG",        /* Base name for the environment variables for this instance */
    68                        RT_ELEMENTS(s_apszGroups),       /* Number of groups in the array */
    69                        s_apszGroups,                    /* Pointer to array of groups. This must stick around for the life of the logger instance */
    70                        fDestFlags,                      /* The destination flags */
    71                        NULL,                            /* Callback function for starting logging and for ending or starting a new file for log history rotation */
    72                        szLogFileName ? 10 : 0,          /* Number of old log files to keep when performing log history rotation */
    73                        szLogFileName ? 100 * _1M : 0,   /* Maximum size of log file when performing history rotation */
    74                        szLogFileName ? RT_SEC_1DAY : 0, /* Maximum time interval per log file when performing history rotation */
    75                        0,                               /* A buffer which is filled with an error message if something fails */
    76                        0,                               /* The size of the error message buffer */
    77                        szLogFileName                    /* Log filename format string */
    78                        );
    79 
    80     AssertReturn(RT_SUCCESS(rc), rc);
     56static int vbclInitLogger(char *pszLogFileName)
     57{
     58    static const char * const s_apszGroups[] = VBOX_LOGGROUP_NAMES;
     59    int rc = RTLogCreateEx(&g_pLogger, RTLOGFLAGS_PREFIX_THREAD | RTLOGFLAGS_PREFIX_TIME_PROG, "all", "VBOXCLIENT_RELEASE_LOG",
     60                           RT_ELEMENTS(s_apszGroups), s_apszGroups, UINT32_MAX /*cMaxEntriesPerGroup*/,
     61                           RTLOGDEST_STDOUT,
     62                           NULL /*pfnPhase*/,
     63                           pszLogFileName ? 10 : 0 /*cHistory*/,
     64                           pszLogFileName ? 100 * _1M : 0 /*cbHistoryFileMax*/,
     65                           pszLogFileName ? RT_SEC_1DAY : 0 /*cSecsHistoryTimeSlot*/,
     66                           NULL /*pErrInfo*/, "%s", pszLogFileName);
     67
     68    AssertRCReturn(rc, rc);
    8169
    8270    /* Register this logger as the release logger */
     
    8674    RTLogFlush(g_pLogger);
    8775
    88     return rc;
     76    return VINF_SUCCESS;
    8977}
    9078
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