VirtualBox

Ignore:
Timestamp:
Dec 8, 2017 10:38:34 AM (7 years ago)
Author:
vboxsync
Message:

Timesync: adjusted log levels for better control.

File:
1 edited

Legend:

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

    r69997 r70008  
    368368
    369369    if (GetSystemTimeAdjustment(&g_dwWinTimeAdjustment, &g_dwWinTimeIncrement, &g_bWinTimeAdjustmentDisabled))
    370         vgsvcTimeSyncLog(3, "vgsvcTimeSyncInit: Initially %ld (100ns) units per %ld (100 ns) units interval, disabled=%d\n",
     370        vgsvcTimeSyncLog(0, "vgsvcTimeSyncInit: Initially %ld (100ns) units per %ld (100 ns) units interval, disabled=%d\n",
    371371                         g_dwWinTimeAdjustment, g_dwWinTimeIncrement, g_bWinTimeAdjustmentDisabled ? 1 : 0);
    372372    else
     
    452452    if (adjtime(&tv, NULL) == 0)
    453453    {
    454         if (g_cVerbosity >= 1)
    455             vgsvcTimeSyncLog(1, "vgsvcTimeSyncAdjust: adjtime by %RDtimespec\n", pDrift);
     454        vgsvcTimeSyncLog(1, "vgsvcTimeSyncAdjust: adjtime by %RDtimespec\n", pDrift);
    456455        g_cTimeSyncErrors = 0;
    457456        return true;
     
    477476        return;
    478477    if (SetSystemTimeAdjustment(0, TRUE /* Periodic adjustments disabled. */))
    479         vgsvcTimeSyncLog(3, "vgsvcTimeSyncCancelAdjust: Windows Time Adjustment is now disabled.\n");
     478        vgsvcTimeSyncLog(4, "vgsvcTimeSyncCancelAdjust: Windows Time Adjustment is now disabled.\n");
    480479    else if (g_cTimeSyncErrors++ < 10)
    481480        VGSvcError("vgsvcTimeSyncCancelAdjust: SetSystemTimeAdjustment(,disable) failed, error=%u\n", GetLastError());
     
    503502        g_cTimeSyncErrors = 0;
    504503
    505         if (g_cVerbosity >= 1)
     504        if (g_cTimeSyncVerbosity >= 1)
    506505        {
    507506            char        sz[64];
     
    510509#ifdef DEBUG
    511510            RTTIMESPEC  Tmp;
    512             if (g_cVerbosity >= 3)
    513                 vgsvcTimeSyncLog(3, "        now %s\n", RTTimeToString(RTTimeExplode(&Time, RTTimeNow(&Tmp)), sz, sizeof(sz)));
     511            vgsvcTimeSyncLog(3, "        now %s\n", RTTimeToString(RTTimeExplode(&Time, RTTimeNow(&Tmp)), sz, sizeof(sz)));
    514512#endif
    515513        }
     
    592590                    && idNewSession != g_idTimeSyncSession)
    593591                {
    594                     vgsvcTimeSyncLog(3, "vgsvcTimeSyncWorker: The VM session ID changed, forcing resync.\n");
     592                    vgsvcTimeSyncLog(2, "vgsvcTimeSyncWorker: The VM session ID changed, forcing resync.\n");
    595593                    g_idTimeSyncSession  = idNewSession;
    596594                    TimeSyncSetThreshold = 0;
     
    611609                RTTIMESPEC AbsDrift = Drift;
    612610                RTTimeSpecAbsolute(&AbsDrift);
    613                 if (g_cVerbosity >= 3)
    614                 {
    615                     vgsvcTimeSyncLog(3, "vgsvcTimeSyncWorker: Host:    %s    (MinAdjust: %RU32 ms)\n",
    616                                      RTTimeToString(RTTimeExplode(&Time, &HostNow), sz, sizeof(sz)), MinAdjust);
    617                     vgsvcTimeSyncLog(3, "vgsvcTimeSyncWorker: Guest: - %s => %RDtimespec drift\n",
    618                                      RTTimeToString(RTTimeExplode(&Time, &GuestNow), sz, sizeof(sz)), &Drift);
    619                 }
     611
     612                vgsvcTimeSyncLog(3, "vgsvcTimeSyncWorker: Host:    %s    (MinAdjust: %RU32 ms)\n",
     613                                 RTTimeToString(RTTimeExplode(&Time, &HostNow), sz, sizeof(sz)), MinAdjust);
     614                vgsvcTimeSyncLog(3, "vgsvcTimeSyncWorker: Guest: - %s => %RDtimespec drift\n",
     615                                 RTTimeToString(RTTimeExplode(&Time, &GuestNow), sz, sizeof(sz)), &Drift);
    620616
    621617                bool fSetTimeInThisLoop = false;
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