Changeset 47525 in vbox for trunk/src/VBox
- Timestamp:
- Aug 2, 2013 5:07:41 PM (11 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/Logging.h
r41040 r47525 41 41 # define LOG_GROUP LOG_GROUP_MAIN 42 42 #endif 43 #ifndef VBOXSVC_LOG_DEFAULT 44 # define VBOXSVC_LOG_DEFAULT "all" 45 #endif 43 46 44 47 #include <VBox/log.h> -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r45138 r47525 222 222 void onNATNetworkChange(IN_BSTR aNetworkName); 223 223 void onNATNetworkStartStop(IN_BSTR aNetworkName, BOOL aStart); 224 void onNATNetworkSetting(IN_BSTR aNetworkName, BOOL aEnabled, IN_BSTR aNetwork, 225 IN_BSTR aGateway, BOOL aAdvertiseDefaultIpv6RouteEnabled, 224 void onNATNetworkSetting(IN_BSTR aNetworkName, BOOL aEnabled, IN_BSTR aNetwork, 225 IN_BSTR aGateway, BOOL aAdvertiseDefaultIpv6RouteEnabled, 226 226 BOOL fNeedDhcpServer); 227 void onNATNetworkPortForward(IN_BSTR aNetworkName, BOOL create, BOOL fIpv6, 228 IN_BSTR aRuleName, NATProtocol_T proto, 229 IN_BSTR aHostIp, LONG aHostPort, 227 void onNATNetworkPortForward(IN_BSTR aNetworkName, BOOL create, BOOL fIpv6, 228 IN_BSTR aRuleName, NATProtocol_T proto, 229 IN_BSTR aHostIp, LONG aHostPort, 230 230 IN_BSTR aGuestIp, LONG aGuestPort); 231 231 -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r47401 r47525 655 655 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 656 656 657 m->strLoggingLevel.cloneTo(aLoggingLevel); 658 657 Utf8Str useLoggingLevel(m->strLoggingLevel); 658 useLoggingLevel = (useLoggingLevel.isEmpty() ? VBOXSVC_LOG_DEFAULT : useLoggingLevel); 659 660 useLoggingLevel.cloneTo(aLoggingLevel); 659 661 return S_OK; 660 662 } … … 674 676 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 675 677 rc = mParent->saveSettings(); 678 } 679 else 680 { 681 LogRel(("Cannot set passed logging level=%s, or the default one - Error=%Rrc \n", aLoggingLevel, rc)); 676 682 } 677 683 … … 1277 1283 HRESULT SystemProperties::setLoggingLevel(const Utf8Str &aLoggingLevel) 1278 1284 { 1279 m->strLoggingLevel = aLoggingLevel; 1280 return S_OK; 1285 HRESULT rc = S_OK; 1286 Utf8Str useLoggingLevel(aLoggingLevel); 1287 rc = RTLogGroupSettings(RTLogRelDefaultInstance(), useLoggingLevel.c_str()); 1288 // If failed and not the default logging level - try to use the default logging level. 1289 if (!SUCCEEDED(rc)){ 1290 // If failed write message to the release log. 1291 LogRel(("Cannot set passed logging level=%s Error=%Rrc \n", useLoggingLevel.c_str(), rc)); 1292 // If attempted logging level not the default one then try the default one. 1293 if (!useLoggingLevel.equals(VBOXSVC_LOG_DEFAULT)){ 1294 rc = RTLogGroupSettings(RTLogRelDefaultInstance(), VBOXSVC_LOG_DEFAULT); 1295 // If failed report this to the release log. 1296 if (!SUCCEEDED(rc)) 1297 LogRel(("Cannot set default logging level Error=%Rrc \n", rc)); 1298 } 1299 // On any failure - set default level as the one to be stored. 1300 useLoggingLevel = VBOXSVC_LOG_DEFAULT; 1301 } 1302 // Set to passed value or if default used/attempted (even if error condition) use empty string. 1303 m->strLoggingLevel = (useLoggingLevel.equals(VBOXSVC_LOG_DEFAULT) ? "" : useLoggingLevel); 1304 return rc; 1281 1305 } 1282 1306 -
trunk/src/VBox/Main/src-server/win/svcmain.cpp
r46909 r47525 347 347 vrc = com::VBoxLogRelCreate("COM Server", szLogFile, 348 348 RTLOGFLAGS_PREFIX_THREAD | RTLOGFLAGS_PREFIX_TIME_PROG, 349 "all", "VBOXSVC_RELEASE_LOG",349 VBOXSVC_LOG_DEFAULT, "VBOXSVC_RELEASE_LOG", 350 350 RTLOGDEST_FILE, UINT32_MAX /* cMaxEntriesPerGroup */, 351 351 cHistory, uHistoryFileTime, uHistoryFileSize, -
trunk/src/VBox/Main/src-server/xpcom/server.cpp
r47376 r47525 903 903 vrc = com::VBoxLogRelCreate("XPCOM Server", szLogFile, 904 904 RTLOGFLAGS_PREFIX_THREAD | RTLOGFLAGS_PREFIX_TIME_PROG, 905 "all", "VBOXSVC_RELEASE_LOG",905 VBOXSVC_LOG_DEFAULT, "VBOXSVC_RELEASE_LOG", 906 906 RTLOGDEST_FILE, UINT32_MAX /* cMaxEntriesPerGroup */, 907 907 cHistory, uHistoryFileTime, uHistoryFileSize,
Note:
See TracChangeset
for help on using the changeset viewer.