MCPcopy Create free account
hub / github.com/cutdigital/mcut / mcDebugOutput

Function mcDebugOutput

tests/source/debugCallback.cpp:41–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39#include <string>
40
41void MCAPI_PTR mcDebugOutput(McDebugSource source,
42 McDebugType type,
43 McUint32 id,
44 McDebugSeverity severity,
45 size_t length,
46 const char* message,
47 const void* userParam)
48{
49
50 // printf("Debug message ( %d ), length=%zu\n%s\n--\n", id, length, message);
51 // printf("userParam=%p\n", userParam);
52
53 std::string debug_src;
54 switch (source) {
55 case MC_DEBUG_SOURCE_API:
56 debug_src = "API";
57 break;
58 case MC_DEBUG_SOURCE_KERNEL:
59 debug_src = "KERNEL";
60 break;
61 case MC_DEBUG_SOURCE_ALL:
62 break;
63 }
64 std::string debug_type;
65 switch (type) {
66 case MC_DEBUG_TYPE_ERROR:
67 debug_type = "ERROR";
68 break;
69 case MC_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
70 debug_type = "DEPRECATION";
71 break;
72 case MC_DEBUG_TYPE_OTHER:
73 // printf("Type: Other");
74 debug_type = "OTHER";
75 break;
76 case MC_DEBUG_TYPE_ALL:
77 break;
78 }
79
80 std::string severity_str;
81
82 switch (severity) {
83 case MC_DEBUG_SEVERITY_HIGH:
84 severity_str = "HIGH";
85 break;
86 case MC_DEBUG_SEVERITY_MEDIUM:
87 severity_str = "MEDIUM";
88 break;
89 case MC_DEBUG_SEVERITY_LOW:
90 severity_str = "LOW";
91 break;
92 case MC_DEBUG_SEVERITY_NOTIFICATION:
93 severity_str = "NOTIFICATION";
94 break;
95 case MC_DEBUG_SEVERITY_ALL:
96 break;
97 }
98

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected