- Timestamp:
- Nov 25, 2009 10:50:52 AM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MediumAttachmentImpl.cpp
r24511 r24934 22 22 #include "MediumAttachmentImpl.h" 23 23 #include "MachineImpl.h" 24 #include "Global.h" 24 25 25 26 #include "Logging.h" … … 89 90 autoInitSpan.setSucceeded(); 90 91 91 LogFlowThisFuncLeave(); 92 /* Construct a short log name for this attachment. */ 93 Utf8Str ctlName(aControllerName); 94 const char *psz = strpbrk(ctlName.c_str(), " \t:-"); 95 mLogName = Utf8StrFmt("MA%p[%.*s:%u:%u:%s%s]", 96 this, 97 psz ? psz - ctlName.c_str() : 4, ctlName.c_str(), 98 aPort, aDevice, Global::stringifySessionState(aType), 99 aImplicit ? ":I" : ""); 100 101 LogFlowThisFunc(("LEAVE - %s\n", logName())); 92 102 return S_OK; 93 103 } … … 99 109 void MediumAttachment::uninit() 100 110 { 101 LogFlowThisFunc Enter();111 LogFlowThisFunc(("ENTER - %s\n", logName())); 102 112 103 113 /* Enclose the state transition Ready->InUninit->NotReady */ … … 118 128 bool MediumAttachment::rollback() 119 129 { 120 LogFlowThisFunc Enter();130 LogFlowThisFunc(("ENTER - %s\n", logName())); 121 131 122 132 /* sanity */ … … 136 146 } 137 147 138 LogFlowThisFunc Leave();148 LogFlowThisFunc(("LEAVE - %s - returning %RTbool\n", logName(), changed)); 139 149 return changed; 140 150 } -
trunk/src/VBox/Main/include/MediumAttachmentImpl.h
r24511 r24934 109 109 } 110 110 111 /** Get a unique and somewhat descriptive name for logging. */ 112 const char *logName(void) const { return mLogName.c_str(); } 113 111 114 /** For com::SupportErrorInfoImpl. */ 112 115 static const char *ComponentName() { return "MediumAttachment"; } … … 144 147 145 148 Backupable<Data> m; 149 150 Utf8Str mLogName; /**< For logging purposes */ 146 151 }; 147 152
Note:
See TracChangeset
for help on using the changeset viewer.