Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Vulkan |
| 3 | * |
| 4 | * Copyright (C) 2014 LunarG, Inc. |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 7 | * copy of this software and associated documentation files (the "Software"), |
| 8 | * to deal in the Software without restriction, including without limitation |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the |
| 11 | * Software is furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included |
| 14 | * in all copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 22 | * DEALINGS IN THE SOFTWARE. |
| 23 | * |
| 24 | * Authors: |
| 25 | * Courtney Goeltzenleuchter <courtney@lunarg.com> |
| 26 | */ |
| 27 | |
| 28 | #ifndef LAYER_LOGGING_H |
| 29 | #define LAYER_LOGGING_H |
| 30 | |
| 31 | #include <stdio.h> |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 32 | #include <stdarg.h> |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 33 | #include <stdbool.h> |
| 34 | #include <unordered_map> |
Tobin Ehlis | 60a9b4f | 2015-07-07 10:42:20 -0600 | [diff] [blame^] | 35 | #include <inttypes.h> |
Tobin Ehlis | 0c6f9ee | 2015-07-03 09:42:57 -0600 | [diff] [blame] | 36 | #include "vk_layer.h" |
Tobin Ehlis | a0cb02e | 2015-07-03 10:15:26 -0600 | [diff] [blame] | 37 | #include "vk_layer_data.h" |
| 38 | #include "vk_layer_table.h" |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 39 | |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 40 | typedef struct _debug_report_data { |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 41 | VkLayerDbgFunctionNode *g_pDbgFunctionHead; |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 42 | VkFlags active_flags; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 43 | bool g_DEBUG_REPORT; |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 44 | } debug_report_data; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 45 | |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 46 | template debug_report_data *get_my_data_ptr<debug_report_data>( |
Courtney Goeltzenleuchter | 7dcc6a7 | 2015-06-11 16:01:11 -0600 | [diff] [blame] | 47 | void *data_key, |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 48 | std::unordered_map<void *, debug_report_data *> &data_map); |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 49 | |
| 50 | // Utility function to handle reporting |
Courtney Goeltzenleuchter | 37d482d | 2015-06-14 11:28:24 -0600 | [diff] [blame] | 51 | static inline void debug_report_log_msg( |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 52 | debug_report_data *debug_data, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 53 | VkFlags msgFlags, |
Tobin Ehlis | 60a9b4f | 2015-07-07 10:42:20 -0600 | [diff] [blame^] | 54 | VkDbgObjectType objectType, |
| 55 | uint64_t srcObject, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 56 | size_t location, |
| 57 | int32_t msgCode, |
| 58 | const char* pLayerPrefix, |
| 59 | const char* pMsg) |
| 60 | { |
| 61 | VkLayerDbgFunctionNode *pTrav = debug_data->g_pDbgFunctionHead; |
| 62 | while (pTrav) { |
| 63 | if (pTrav->msgFlags & msgFlags) { |
| 64 | pTrav->pfnMsgCallback(msgFlags, |
| 65 | objectType, srcObject, |
| 66 | location, |
| 67 | msgCode, |
| 68 | pLayerPrefix, |
| 69 | pMsg, |
| 70 | (void *) pTrav->pUserData); |
| 71 | } |
| 72 | pTrav = pTrav->pNext; |
| 73 | } |
| 74 | } |
| 75 | |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 76 | static inline debug_report_data *debug_report_create_instance( |
| 77 | VkLayerInstanceDispatchTable *table, |
| 78 | VkInstance inst, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 79 | uint32_t extension_count, |
Courtney Goeltzenleuchter | 110fdf9 | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 80 | const char*const* ppEnabledExtensions) // layer or extension name to be enabled |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 81 | { |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 82 | debug_report_data *debug_data; |
| 83 | PFN_vkGetInstanceProcAddr gpa = table->GetInstanceProcAddr; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 84 | |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 85 | table->DbgCreateMsgCallback = (PFN_vkDbgCreateMsgCallback) gpa(inst, "vkDbgCreateMsgCallback"); |
| 86 | table->DbgDestroyMsgCallback = (PFN_vkDbgDestroyMsgCallback) gpa(inst, "vkDbgDestroyMsgCallback"); |
| 87 | |
| 88 | debug_data = (debug_report_data *) malloc(sizeof(debug_report_data)); |
| 89 | if (!debug_data) return NULL; |
| 90 | |
| 91 | memset(debug_data, 0, sizeof(debug_report_data)); |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 92 | for (uint32_t i = 0; i < extension_count; i++) { |
| 93 | /* TODO: Check other property fields */ |
Courtney Goeltzenleuchter | 110fdf9 | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 94 | if (strcmp(ppEnabledExtensions[i], DEBUG_REPORT_EXTENSION_NAME) == 0) { |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 95 | debug_data->g_DEBUG_REPORT = true; |
| 96 | } |
| 97 | } |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 98 | return debug_data; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 99 | } |
| 100 | |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 101 | static inline void layer_debug_report_destroy_instance(debug_report_data *debug_data) |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 102 | { |
Courtney Goeltzenleuchter | ee4027d | 2015-06-28 13:01:17 -0600 | [diff] [blame] | 103 | VkLayerDbgFunctionNode *pTrav; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 104 | VkLayerDbgFunctionNode *pTravNext; |
| 105 | |
Courtney Goeltzenleuchter | ee4027d | 2015-06-28 13:01:17 -0600 | [diff] [blame] | 106 | if (!debug_data) { |
| 107 | return; |
| 108 | } |
| 109 | |
| 110 | pTrav = debug_data->g_pDbgFunctionHead; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 111 | /* Clear out any leftover callbacks */ |
| 112 | while (pTrav) { |
| 113 | pTravNext = pTrav->pNext; |
| 114 | |
| 115 | debug_report_log_msg( |
| 116 | debug_data, VK_DBG_REPORT_WARN_BIT, |
Tobin Ehlis | 60a9b4f | 2015-07-07 10:42:20 -0600 | [diff] [blame^] | 117 | VK_OBJECT_TYPE_MSG_CALLBACK, pTrav->msgCallback.handle, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 118 | 0, DEBUG_REPORT_CALLBACK_REF, |
| 119 | "DebugReport", |
| 120 | "Debug Report callbacks not removed before DestroyInstance"); |
| 121 | |
| 122 | free(pTrav); |
| 123 | pTrav = pTravNext; |
| 124 | } |
| 125 | debug_data->g_pDbgFunctionHead = NULL; |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 126 | |
| 127 | free(debug_data); |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 128 | } |
| 129 | |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 130 | static inline debug_report_data *layer_debug_report_create_device( |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 131 | debug_report_data *instance_debug_data, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 132 | VkDevice device) |
| 133 | { |
Courtney Goeltzenleuchter | 2f25bb4 | 2015-06-14 11:29:24 -0600 | [diff] [blame] | 134 | /* DEBUG_REPORT shares data between Instance and Device, |
| 135 | * so just return instance's data pointer */ |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 136 | return instance_debug_data; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | static inline void layer_debug_report_destroy_device(VkDevice device) |
| 140 | { |
Courtney Goeltzenleuchter | 2f25bb4 | 2015-06-14 11:29:24 -0600 | [diff] [blame] | 141 | /* Nothing to do since we're using instance data record */ |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | static inline VkResult layer_create_msg_callback( |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 145 | debug_report_data *debug_data, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 146 | VkFlags msgFlags, |
| 147 | const PFN_vkDbgMsgCallback pfnMsgCallback, |
| 148 | void *pUserData, |
| 149 | VkDbgMsgCallback *pMsgCallback) |
| 150 | { |
| 151 | VkLayerDbgFunctionNode *pNewDbgFuncNode = (VkLayerDbgFunctionNode*)malloc(sizeof(VkLayerDbgFunctionNode)); |
| 152 | if (!pNewDbgFuncNode) |
| 153 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 154 | |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 155 | pNewDbgFuncNode->msgCallback = *pMsgCallback; |
| 156 | pNewDbgFuncNode->pfnMsgCallback = pfnMsgCallback; |
| 157 | pNewDbgFuncNode->msgFlags = msgFlags; |
| 158 | pNewDbgFuncNode->pUserData = pUserData; |
| 159 | pNewDbgFuncNode->pNext = debug_data->g_pDbgFunctionHead; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 160 | |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 161 | debug_data->g_pDbgFunctionHead = pNewDbgFuncNode; |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 162 | debug_data->active_flags |= msgFlags; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 163 | |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 164 | debug_report_log_msg( |
| 165 | debug_data, VK_DBG_REPORT_DEBUG_BIT, |
Tobin Ehlis | 60a9b4f | 2015-07-07 10:42:20 -0600 | [diff] [blame^] | 166 | VK_OBJECT_TYPE_MSG_CALLBACK, (*pMsgCallback).handle, |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 167 | 0, DEBUG_REPORT_CALLBACK_REF, |
| 168 | "DebugReport", |
| 169 | "Added callback"); |
| 170 | return VK_SUCCESS; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 171 | } |
| 172 | |
Courtney Goeltzenleuchter | 37d482d | 2015-06-14 11:28:24 -0600 | [diff] [blame] | 173 | static inline void layer_destroy_msg_callback( |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 174 | debug_report_data *debug_data, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 175 | VkDbgMsgCallback msg_callback) |
| 176 | { |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 177 | VkLayerDbgFunctionNode *pTrav = debug_data->g_pDbgFunctionHead; |
| 178 | VkLayerDbgFunctionNode *pPrev = pTrav; |
| 179 | |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 180 | debug_data->active_flags = 0; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 181 | while (pTrav) { |
| 182 | if (pTrav->msgCallback == msg_callback) { |
| 183 | pPrev->pNext = pTrav->pNext; |
| 184 | if (debug_data->g_pDbgFunctionHead == pTrav) { |
| 185 | debug_data->g_pDbgFunctionHead = pTrav->pNext; |
| 186 | } |
| 187 | free(pTrav); |
| 188 | debug_report_log_msg( |
| 189 | debug_data, VK_DBG_REPORT_DEBUG_BIT, |
Tobin Ehlis | 60a9b4f | 2015-07-07 10:42:20 -0600 | [diff] [blame^] | 190 | VK_OBJECT_TYPE_MSG_CALLBACK, pTrav->msgCallback.handle, |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 191 | 0, DEBUG_REPORT_NONE, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 192 | "DebugReport", |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 193 | "Destroyed callback"); |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 194 | } |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 195 | debug_data->active_flags |= pTrav->msgFlags; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 196 | pPrev = pTrav; |
| 197 | pTrav = pTrav->pNext; |
| 198 | } |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 199 | } |
| 200 | |
Courtney Goeltzenleuchter | 37d482d | 2015-06-14 11:28:24 -0600 | [diff] [blame] | 201 | static inline void* debug_report_get_instance_proc_addr( |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 202 | debug_report_data *debug_data, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 203 | const char *funcName) |
| 204 | { |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 205 | if (!debug_data || !debug_data->g_DEBUG_REPORT) { |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 206 | return NULL; |
| 207 | } |
| 208 | |
| 209 | if (!strcmp(funcName, "vkDbgCreateMsgCallback")) { |
| 210 | return (void *) vkDbgCreateMsgCallback; |
| 211 | } |
| 212 | if (!strcmp(funcName, "vkDbgDestroyMsgCallback")) { |
| 213 | return (void *) vkDbgDestroyMsgCallback; |
| 214 | } |
| 215 | |
| 216 | return NULL; |
| 217 | } |
| 218 | |
| 219 | /* |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 220 | * Output log message via DEBUG_REPORT |
| 221 | * Takes format and variable arg list so that output string |
| 222 | * is only computed if a message needs to be logged |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 223 | */ |
Courtney Goeltzenleuchter | 37d482d | 2015-06-14 11:28:24 -0600 | [diff] [blame] | 224 | static inline void log_msg( |
Courtney Goeltzenleuchter | e45acec | 2015-06-14 12:03:26 -0600 | [diff] [blame] | 225 | debug_report_data *debug_data, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 226 | VkFlags msgFlags, |
Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 227 | VkDbgObjectType objectType, |
| 228 | uint64_t srcObject, |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 229 | size_t location, |
| 230 | int32_t msgCode, |
| 231 | const char* pLayerPrefix, |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 232 | const char* format, |
| 233 | ...) |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 234 | { |
Courtney Goeltzenleuchter | 61cb70a | 2015-06-26 15:14:50 -0600 | [diff] [blame] | 235 | if (!debug_data || !(debug_data->active_flags & msgFlags)) { |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 236 | /* message is not wanted */ |
| 237 | return; |
| 238 | } |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 239 | |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 240 | char str[1024]; |
| 241 | va_list argptr; |
| 242 | va_start(argptr, format); |
| 243 | vsnprintf(str, 1024, format, argptr); |
| 244 | va_end(argptr); |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 245 | debug_report_log_msg(debug_data, msgFlags, objectType, |
| 246 | srcObject, location, msgCode, |
Courtney Goeltzenleuchter | b9f0bf3 | 2015-06-14 09:50:18 -0600 | [diff] [blame] | 247 | pLayerPrefix, str); |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 248 | } |
| 249 | |
Courtney Goeltzenleuchter | 2f25bb4 | 2015-06-14 11:29:24 -0600 | [diff] [blame] | 250 | static inline void VKAPI log_callback( |
| 251 | VkFlags msgFlags, |
Tony Barbour | 1d2cd3f | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 252 | VkDbgObjectType objType, |
| 253 | uint64_t srcObject, |
Courtney Goeltzenleuchter | 2f25bb4 | 2015-06-14 11:29:24 -0600 | [diff] [blame] | 254 | size_t location, |
| 255 | int32_t msgCode, |
| 256 | const char* pLayerPrefix, |
| 257 | const char* pMsg, |
| 258 | void* pUserData) |
| 259 | { |
| 260 | char msg_flags[30]; |
Courtney Goeltzenleuchter | 7d8503b | 2015-06-11 15:58:51 -0600 | [diff] [blame] | 261 | |
Courtney Goeltzenleuchter | 2f25bb4 | 2015-06-14 11:29:24 -0600 | [diff] [blame] | 262 | print_msg_flags(msgFlags, msg_flags); |
| 263 | |
Tobin Ehlis | 60a9b4f | 2015-07-07 10:42:20 -0600 | [diff] [blame^] | 264 | fprintf((FILE *) pUserData, "%s(%s): object: %#" PRIx64 " type: %d location: %zu msgCode: %d: %s\n", |
Courtney Goeltzenleuchter | 2f25bb4 | 2015-06-14 11:29:24 -0600 | [diff] [blame] | 265 | pLayerPrefix, msg_flags, srcObject, objType, location, msgCode, pMsg); |
| 266 | } |
| 267 | #endif // LAYER_LOGGING_H |