VirtualBox

Ignore:
Timestamp:
Mar 19, 2014 4:20:08 PM (11 years ago)
Author:
vboxsync
Message:

VBoxGuest/VBoxGuest.cpp: Logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r50803 r50826  
    908908     */
    909909    static const char * const s_apszGroups[] = VBOX_LOGGROUP_NAMES;
     910    RTUINT fFlags =   RTLOGFLAGS_PREFIX_TIME | RTLOGFLAGS_PREFIX_TID
     911                    | RTLOGFLAGS_PREFIX_THREAD | RTLOGFLAGS_PREFIX_TIME_PROG;
    910912    PRTLOGGER pRelLogger;
    911     rc = RTLogCreate(&pRelLogger, 0 /* fFlags */, "all",
    912                      "VBOX_RELEASE_LOG", RT_ELEMENTS(s_apszGroups), s_apszGroups, RTLOGDEST_STDOUT | RTLOGDEST_DEBUGGER, NULL);
     913    rc = RTLogCreate(&pRelLogger, fFlags, "all",
     914#ifdef DEBUG
     915                     "VBOXGUEST_LOG",
     916#else
     917                     "VBOXGUEST_RELEASE_LOG",
     918#endif
     919                     RT_ELEMENTS(s_apszGroups), s_apszGroups,
     920                     RTLOGDEST_STDOUT | RTLOGDEST_DEBUGGER, NULL);
    913921    if (RT_SUCCESS(rc))
     922    {
    914923        RTLogRelSetDefaultInstance(pRelLogger);
     924
     925        /* Explicitly flush the log in case of VBOXGUEST_RELEASE_LOG=buffered. */
     926        RTLogFlush(pRelLogger);
     927    }
    915928    /** @todo Add native hook for getting logger config parameters and setting
    916      *        them. On linux we should use the module parameter stuff... */
     929     *        them. On Linux we use the module parameter stuff (see vboxguestLinuxModInit). */
    917930#endif
    918931
     
    12241237{
    12251238    unsigned i; NOREF(i);
    1226     Log(("VBoxGuestCloseSession: pSession=%p proc=%RTproc (%d) r0proc=%p\n",
    1227          pSession, pSession->Process, (int)pSession->Process, (uintptr_t)pSession->R0Process)); /** @todo %RTr0proc */
     1239    LogFlowFunc(("pSession=%p proc=%RTproc (%d) r0proc=%p\n",
     1240                 pSession, pSession->Process, (int)pSession->Process, (uintptr_t)pSession->R0Process)); /** @todo %RTr0proc */
    12281241
    12291242    RTSpinlockAcquire(pDevExt->SessionSpinlock);
     
    12421255            Info.u32ClientID = pSession->aHGCMClientIds[i];
    12431256            pSession->aHGCMClientIds[i] = 0;
    1244             Log(("VBoxGuestCloseSession: disconnecting client id %#RX32\n", Info.u32ClientID));
     1257            LogFlowFunc(("Disconnecting client ID=%#RX32\n", Info.u32ClientID));
    12451258            VbglR0HGCMInternalDisconnect(&Info, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT);
    12461259        }
     
    30303043            PVBOXGUESTWAIT  pSafe;
    30313044
     3045#ifndef DEBUG_andy
    30323046            LogFlowFunc(("Acknowledge events succeeded: %#RX32\n", fEvents));
    3033 
     3047#endif
    30343048            /*
    30353049             * VMMDEV_EVENT_MOUSE_POSITION_CHANGED can only be polled for.
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