Changeset 22700 in vbox
- Timestamp:
- Sep 2, 2009 10:05:23 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
include/VBox/com/ptr.h (modified) (2 diffs)
-
include/iprt/log.h (modified) (2 diffs)
-
include/iprt/xml_cpp.h (modified) (2 diffs)
-
src/VBox/Main/glue/com.cpp (modified) (2 diffs)
-
src/VBox/Runtime/common/log/log.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/ptr.h
r22305 r22700 67 67 #include <VBox/com/assert.h> 68 68 69 namespace com 70 { 71 #define LOGREF(pObj, cRefs) com::LogRef(#pObj "{%p}.refCnt=%d\n", (pObj), (cRefs)); 72 void LogRef(const char *pcszFormat, ...); 73 } 74 69 75 /** 70 76 * Strong referencing operators. Used as a second argument to ComPtr<>/ComObjPtr<>. … … 75 81 protected: 76 82 77 static void addref (C *p) { p->AddRef(); } 78 static void release (C *p) { p->Release(); } 83 static void addref(C *p) 84 { 85 size_t cRefs = p->AddRef(); 86 LOGREF(p, cRefs); 87 } 88 static void release(C *p) 89 { 90 p->Release(); 91 } 79 92 }; 80 93 -
trunk/include/iprt/log.h
r21953 r22700 402 402 /** aleksey logging. */ 403 403 RTLOGGRPFLAGS_ALEKSEY = 0x00020000, 404 /** dj logging. */ 405 RTLOGGRPFLAGS_DJ = 0x00040000, 404 406 /** NoName logging. */ 405 RTLOGGRPFLAGS_NONAME = 0x000 40000407 RTLOGGRPFLAGS_NONAME = 0x00080000 406 408 } RTLOGGRPFLAGS; 407 409 … … 612 614 #define LogAleksey(a) LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_ALEKSEY, LOG_GROUP, a) 613 615 616 /** @def LogDJ 617 * dj logging. 618 */ 619 #define LogDJ(a) LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_DJ, LOG_GROUP, a) 620 614 621 /** @def LogNoName 615 622 * NoName logging. 616 623 */ 617 624 #define LogNoName(a) LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_NONAME, LOG_GROUP, a) 618 619 625 620 626 /** @def LogWarning -
trunk/include/iprt/xml_cpp.h
r22173 r22700 33 33 #ifndef IN_RING3 34 34 # error "There are no XML APIs available in Ring-0 Context!" 35 #e lse /* IN_RING3 */35 #endif 36 36 37 37 #include <list> … … 649 649 #endif 650 650 651 #endif /* IN_RING3 */652 653 651 /** @} */ 654 652 -
trunk/src/VBox/Main/glue/com.cpp
r21878 r22700 48 48 #include <iprt/env.h> 49 49 #include <iprt/string.h> 50 #include <iprt/log.h> 50 51 51 52 #include <VBox/err.h> … … 201 202 #endif /* (VBOX_WITH_XPCOM) */ 202 203 204 /** 205 * Used by ComPtr and friends to log details about reference counting. 206 * @param pcszFormat 207 */ 208 void LogRef(const char *pcszFormat, ...) 209 { 210 va_list va; 211 va_start(va, pcszFormat); 212 va_end(va); 213 214 char *psz = NULL; 215 RTStrAPrintfV(&psz, pcszFormat, va); 216 LogDJ((psz)); 217 RTStrFree(psz); 218 } 219 203 220 } /* namespace com */ -
trunk/src/VBox/Runtime/common/log/log.cpp
r22204 r22700 1175 1175 { "bird", RTLOGGRPFLAGS_BIRD }, 1176 1176 { "aleksey", RTLOGGRPFLAGS_ALEKSEY }, 1177 { "dj", RTLOGGRPFLAGS_DJ }, 1177 1178 { "n", RTLOGGRPFLAGS_NONAME }, 1178 1179 { "noname", RTLOGGRPFLAGS_NONAME }
Note:
See TracChangeset
for help on using the changeset viewer.

