From 6a0bfbf61a71e289fa0f62c3b0f47d13ba0d1658 Mon Sep 17 00:00:00 2001
From: Chris Rienzo <chris.rienzo@citrix.com>
Date: Wed, 29 Jul 2015 15:08:43 -0400
Subject: [PATCH] FS-7912 add session UUID to embedded language (lua,
 javascript, etc) logs when session sanity check fails

---
 src/include/switch_cpp.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/include/switch_cpp.h b/src/include/switch_cpp.h
index 07c77ec54f..7fef07f4cd 100644
--- a/src/include/switch_cpp.h
+++ b/src/include/switch_cpp.h
@@ -11,8 +11,8 @@ extern "C" {
 #include <switch.h>
 #define this_check(x) do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return x;}} while(0)
 #define this_check_void() do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return;}} while(0)
-#define sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0)
-#define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0)
+#define sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid),SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0)
+#define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid),SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0)
 #define init_vars() allocated = 0;						\
 	session = NULL;										\
 	channel = NULL;										\