Index: /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp	(revision 50825)
+++ /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp	(revision 50826)
@@ -908,11 +908,24 @@
      */
     static const char * const s_apszGroups[] = VBOX_LOGGROUP_NAMES;
+    RTUINT fFlags =   RTLOGFLAGS_PREFIX_TIME | RTLOGFLAGS_PREFIX_TID
+                    | RTLOGFLAGS_PREFIX_THREAD | RTLOGFLAGS_PREFIX_TIME_PROG;
     PRTLOGGER pRelLogger;
-    rc = RTLogCreate(&pRelLogger, 0 /* fFlags */, "all",
-                     "VBOX_RELEASE_LOG", RT_ELEMENTS(s_apszGroups), s_apszGroups, RTLOGDEST_STDOUT | RTLOGDEST_DEBUGGER, NULL);
+    rc = RTLogCreate(&pRelLogger, fFlags, "all",
+#ifdef DEBUG
+                     "VBOXGUEST_LOG",
+#else
+                     "VBOXGUEST_RELEASE_LOG",
+#endif
+                     RT_ELEMENTS(s_apszGroups), s_apszGroups,
+                     RTLOGDEST_STDOUT | RTLOGDEST_DEBUGGER, NULL);
     if (RT_SUCCESS(rc))
+    {
         RTLogRelSetDefaultInstance(pRelLogger);
+
+        /* Explicitly flush the log in case of VBOXGUEST_RELEASE_LOG=buffered. */
+        RTLogFlush(pRelLogger);
+    }
     /** @todo Add native hook for getting logger config parameters and setting
-     *        them. On linux we should use the module parameter stuff... */
+     *        them. On Linux we use the module parameter stuff (see vboxguestLinuxModInit). */
 #endif
 
@@ -1224,6 +1237,6 @@
 {
     unsigned i; NOREF(i);
-    Log(("VBoxGuestCloseSession: pSession=%p proc=%RTproc (%d) r0proc=%p\n",
-         pSession, pSession->Process, (int)pSession->Process, (uintptr_t)pSession->R0Process)); /** @todo %RTr0proc */
+    LogFlowFunc(("pSession=%p proc=%RTproc (%d) r0proc=%p\n",
+                 pSession, pSession->Process, (int)pSession->Process, (uintptr_t)pSession->R0Process)); /** @todo %RTr0proc */
 
     RTSpinlockAcquire(pDevExt->SessionSpinlock);
@@ -1242,5 +1255,5 @@
             Info.u32ClientID = pSession->aHGCMClientIds[i];
             pSession->aHGCMClientIds[i] = 0;
-            Log(("VBoxGuestCloseSession: disconnecting client id %#RX32\n", Info.u32ClientID));
+            LogFlowFunc(("Disconnecting client ID=%#RX32\n", Info.u32ClientID));
             VbglR0HGCMInternalDisconnect(&Info, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT);
         }
@@ -3030,6 +3043,7 @@
             PVBOXGUESTWAIT  pSafe;
 
+#ifndef DEBUG_andy
             LogFlowFunc(("Acknowledge events succeeded: %#RX32\n", fEvents));
-
+#endif
             /*
              * VMMDEV_EVENT_MOUSE_POSITION_CHANGED can only be polled for.
