Changeset 95959 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray
- Timestamp:
- Aug 1, 2022 1:26:39 PM (2 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxTray
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/Makefile.kmk
r95862 r95959 31 31 VBoxTray_DEFS := VBOX_WITH_HGCM VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" 32 32 endif 33 VBoxTray_DEFS += LOG_ENABLED 33 34 VBoxTray_LDFLAGS = -SubSystem:Windows 34 35 VBoxTray_INCS = \ -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp
r95833 r95959 21 21 *********************************************************************************************************************************/ 22 22 #define LOG_GROUP LOG_GROUP_GUEST_DND 23 #include <VBox/log.h> 24 23 25 #include <iprt/win/windows.h> 24 26 #include "VBoxTray.h" … … 43 45 44 46 #include <VBox/err.h> 45 #include <VBox/log.h>46 47 47 48 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r95877 r95959 589 589 RTLogSetDefaultInstance(g_pLoggerRelease); 590 590 591 switch (g_cVerbosity) /* Not very elegant, but has to do it for now. */ 592 { 593 case 1: 594 rc = RTLogGroupSettings(g_pLoggerRelease, "all.e.l"); 591 const char *apszGroups[] = { "all", "guest_dnd" }; /* All groups we want to enable logging for VBoxTray. */ 592 char szGroupSettings[_1K]; 593 594 szGroupSettings[0] = '\0'; 595 596 for (size_t i = 0; i < RT_ELEMENTS(apszGroups); i++) 597 { 598 if (i > 0) 599 rc = RTStrCat(szGroupSettings, sizeof(szGroupSettings), "+"); 600 if (RT_SUCCESS(rc)) 601 rc = RTStrCat(szGroupSettings, sizeof(szGroupSettings), apszGroups[i]); 602 if (RT_FAILURE(rc)) 595 603 break; 596 604 597 case 2: 598 rc = RTLogGroupSettings(g_pLoggerRelease, "all.e.l.l2"); 605 switch (g_cVerbosity) 606 { 607 case 1: 608 rc = RTStrCat(szGroupSettings, sizeof(szGroupSettings), ".e.l"); 609 break; 610 611 case 2: 612 rc = RTStrCat(szGroupSettings, sizeof(szGroupSettings), ".e.l.l2"); 613 break; 614 615 case 3: 616 rc = RTStrCat(szGroupSettings, sizeof(szGroupSettings), ".e.l.l2.l3"); 617 break; 618 619 case 4: 620 RT_FALL_THROUGH(); 621 default: 622 rc = RTStrCat(szGroupSettings, sizeof(szGroupSettings), ".e.l.l2.l3.f"); 623 break; 624 } 625 626 if (RT_FAILURE(rc)) 599 627 break; 600 601 case 3: 602 rc = RTLogGroupSettings(g_pLoggerRelease, "all.e.l.l2.l3"); 603 break; 604 605 case 4: 606 RT_FALL_THROUGH(); 607 default: 608 rc = RTLogGroupSettings(g_pLoggerRelease, "all.e.l.l2.l3.f"); 609 break; 610 } 628 } 629 630 LogRel(("Verbose log settings are: %s\n", szGroupSettings)); 631 632 if (RT_SUCCESS(rc)) 633 rc = RTLogGroupSettings(g_pLoggerRelease, szGroupSettings); 611 634 if (RT_FAILURE(rc)) 612 RTMsgError("Setting debug loggingfailed, rc=%Rrc\n", rc);635 RTMsgError("Setting log group settings failed, rc=%Rrc\n", rc); 613 636 614 637 /* Explicitly flush the log in case of VBOXTRAY_RELEASE_LOG=buffered. */
Note:
See TracChangeset
for help on using the changeset viewer.