add userdata param to switch_log_printf so we can pass uuid or other session or other identification information to the logger.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5412 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-06-20 09:19:45 +00:00
parent 25f2fc817e
commit 5b27ad1332
6 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ SWITCH_BEGIN_EXTERN_C
switch_time_t timestamp;
/*! A pointer to where the actual content of the message starts (skipping past the preformatted portion) */
char *content;
const char *userdata;
/* To maintain abi, only add new elements to the end of this struct and do not delete any elements */
} switch_log_node_t;
@@ -95,7 +95,7 @@ SWITCH_DECLARE(switch_status_t) switch_log_shutdown(void);
\note there are channel macros to supply the first 4 parameters
*/
SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char *file, const char *func, int line,
switch_log_level_t level, const char *fmt, ...) PRINTF_FUNCTION(6, 7);
const char *userdata, switch_log_level_t level, const char *fmt, ...) PRINTF_FUNCTION(6, 7);
/*!
\brief Shut down the logging engine
+3 -3
View File
@@ -511,9 +511,9 @@ typedef enum {
SCSMF_DYNAMIC = (1 << 0)
} switch_core_session_message_flag_t;
#define SWITCH_CHANNEL_LOG SWITCH_CHANNEL_ID_LOG, __FILE__, __SWITCH_FUNC__, __LINE__
#define SWITCH_CHANNEL_LOG_CLEAN SWITCH_CHANNEL_ID_LOG_CLEAN, __FILE__, __SWITCH_FUNC__, __LINE__
#define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, __SWITCH_FUNC__, __LINE__
#define SWITCH_CHANNEL_LOG SWITCH_CHANNEL_ID_LOG, __FILE__, __SWITCH_FUNC__, __LINE__, NULL
#define SWITCH_CHANNEL_LOG_CLEAN SWITCH_CHANNEL_ID_LOG_CLEAN, __FILE__, __SWITCH_FUNC__, __LINE__, NULL
#define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, __SWITCH_FUNC__, __LINE__, NULL
/*!
\enum switch_channel_state_t