Changeset 48310 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Sep 5, 2013 2:19:29 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r48301 r48310 4208 4208 } 4209 4209 4210 /* After initializing *vmUuid* we already know if that is VM process or not: */ 4211 if (!isVMConsoleProcess()) 4212 { 4213 /* We should create separate logging file for VM selector: */ 4214 char szLogFile[RTPATH_MAX]; 4215 const char *pszLogFile = NULL; 4216 com::GetVBoxUserHomeDirectory(szLogFile, sizeof(szLogFile)); 4217 RTPathAppend(szLogFile, sizeof(szLogFile), "selectorwindow.log"); 4218 pszLogFile = szLogFile; 4219 /* Create release logger, to file: */ 4220 char szError[RTPATH_MAX + 128]; 4221 com::VBoxLogRelCreate("GUI VM Selector Window", 4222 pszLogFile, 4223 RTLOGFLAGS_PREFIX_TIME_PROG, 4224 "all", 4225 "VBOX_GUI_SELECTORWINDOW_RELEASE_LOG", 4226 RTLOGDEST_FILE, 4227 UINT32_MAX, 4228 1, 4229 60 * 60, 4230 _1M, 4231 szError, 4232 sizeof(szError)); 4233 } 4234 4210 4235 if (mSettingsPwSet) 4211 4236 mVBox.SetSettingsSecret(mSettingsPw); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r48087 r48310 46 46 #include "CMachine.h" 47 47 #include "CVirtualBox.h" 48 49 /* Other VBox includes: */50 #include <VBox/com/com.h>51 #include <iprt/path.h>52 48 53 49 /* Type defs: */ … … 86 82 /* Prepare connections: */ 87 83 prepareConnections(); 88 89 /* Prepare release logging: */90 prepareReleaseLogging();91 84 } 92 85 … … 1227 1220 connect(gVBoxEvents, SIGNAL(sigSnapshotChange(QString, QString)), 1228 1221 this, SLOT(sltSnapshotChanged(QString, QString))); 1229 }1230 1231 void UIGChooserModel::prepareReleaseLogging()1232 {1233 /* Prepare release logging: */1234 char szLogFile[RTPATH_MAX];1235 const char *pszLogFile = NULL;1236 com::GetVBoxUserHomeDirectory(szLogFile, sizeof(szLogFile));1237 RTPathAppend(szLogFile, sizeof(szLogFile), "selectorwindow.log");1238 pszLogFile = szLogFile;1239 /* Create release logger, to file: */1240 char szError[RTPATH_MAX + 128];1241 com::VBoxLogRelCreate("GUI VM Selector Window",1242 pszLogFile,1243 RTLOGFLAGS_PREFIX_TIME_PROG,1244 "all",1245 "VBOX_GUI_SELECTORWINDOW_RELEASE_LOG",1246 RTLOGDEST_FILE,1247 UINT32_MAX,1248 1,1249 60 * 60,1250 _1M,1251 szError,1252 sizeof(szError));1253 1222 } 1254 1223 … … 1635 1604 { 1636 1605 /* Add all the approved machines we have into the group-tree: */ 1637 LogRel (("Loading VMs started...\n"));1606 LogRelFlow(("UIGChooserModel: Loading VMs...\n")); 1638 1607 foreach (CMachine machine, vboxGlobal().virtualBox().GetMachines()) 1639 1608 if (VBoxGlobal::shouldWeShowMachine(machine)) 1640 1609 addMachineIntoTheTree(machine); 1641 LogRel (("Loading VMs finished.\n"));1610 LogRelFlow(("UIGChooserModel: VMs loaded.\n")); 1642 1611 } 1643 1612 1644 1613 void UIGChooserModel::addMachineIntoTheTree(const CMachine &machine, bool fMakeItVisible /* = false */) 1645 1614 { 1615 /* Make sure passed VM is not NULL: */ 1616 if (machine.isNull()) 1617 LogRelFlow(("UIGChooserModel: ERROR: Passed VM is NULL!\n")); 1618 AssertReturnVoid(!machine.isNull()); 1619 1646 1620 /* Which VM we are loading: */ 1647 if (machine.isNull()) 1648 LogRel((" ERROR: VM is NULL!\n")); 1649 else 1650 LogRel((" Loading VM {%s}...\n", machine.GetId().toAscii().constData())); 1621 LogRelFlow(("UIGChooserModel: Loading VM with ID={%s}...\n", machine.GetId().toAscii().constData())); 1651 1622 /* Is that machine accessible? */ 1652 1623 if (machine.GetAccessible()) … … 1654 1625 /* VM is accessible: */ 1655 1626 QString strName = machine.GetName(); 1656 LogRel (("VM {%s} is accessible.\n", strName.toAscii().constData()));1627 LogRelFlow(("UIGChooserModel: VM {%s} is accessible.\n", strName.toAscii().constData())); 1657 1628 /* Which groups passed machine attached to? */ 1658 1629 QVector<QString> groups = machine.GetGroups(); 1659 1630 QStringList groupList = groups.toList(); 1660 1631 QString strGroups = groupList.join(", "); 1661 LogRel ((" VM {%s} groups are{%s}.\n", strName.toAscii().constData(),1662 strGroups.toAscii().constData()));1632 LogRelFlow(("UIGChooserModel: VM {%s} has groups: {%s}.\n", strName.toAscii().constData(), 1633 strGroups.toAscii().constData())); 1663 1634 foreach (QString strGroup, groups) 1664 1635 { … … 1667 1638 strGroup.truncate(strGroup.size() - 1); 1668 1639 /* Create machine-item with found group-item as parent: */ 1669 LogRel ((" Creating item for VM {%s},group {%s}.\n", strName.toAscii().constData(),1670 strGroup.toAscii().constData()));1640 LogRelFlow(("UIGChooserModel: Creating item for VM {%s} in group {%s}.\n", strName.toAscii().constData(), 1641 strGroup.toAscii().constData())); 1671 1642 createMachineItem(machine, getGroupItem(strGroup, mainRoot(), fMakeItVisible)); 1672 1643 } … … 1678 1649 { 1679 1650 /* VM is accessible: */ 1680 LogRel (("VM {%s} is inaccessible.\n", machine.GetId().toAscii().constData()));1651 LogRelFlow(("UIGChooserModel: VM {%s} is inaccessible.\n", machine.GetId().toAscii().constData())); 1681 1652 /* Create machine-item with main-root group-item as parent: */ 1682 1653 createMachineItem(machine, mainRoot()); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
r45273 r48310 219 219 void prepareHandlers(); 220 220 void prepareConnections(); 221 void prepareReleaseLogging();222 221 void loadLastSelectedItem(); 223 222
Note:
See TracChangeset
for help on using the changeset viewer.