[asterisk-commits] mmichelson: trunk r117693 - in /trunk: include/asterisk/ main/ utils/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 21 17:34:28 CDT 2008
Author: mmichelson
Date: Wed May 21 17:34:27 2008
New Revision: 117693
URL: http://svn.digium.com/view/asterisk?view=rev&rev=117693
Log:
This change makes it so that logs will report the correct source of verbose messages.
Until this change, all verbose messages in Asterisk's log files reported logger.c
as the source of the message.
Modified:
trunk/include/asterisk/logger.h
trunk/main/logger.c
trunk/utils/ael_main.c
trunk/utils/hashtest.c
trunk/utils/hashtest2.c
trunk/utils/refcounter.c
Modified: trunk/include/asterisk/logger.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/logger.h?view=diff&rev=117693&r1=117692&r2=117693
==============================================================================
--- trunk/include/asterisk/logger.h (original)
+++ trunk/include/asterisk/logger.h Wed May 21 17:34:27 2008
@@ -75,8 +75,10 @@
Note the abscence of a comma after the VERBOSE_PREFIX_3. This is important.
VERBOSE_PREFIX_1 through VERBOSE_PREFIX_3 are defined.
*/
-void ast_verbose(const char *fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
+void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...)
+ __attribute__ ((format (printf, 4, 5)));
+
+#define ast_verbose(...) __ast_verbose(__FILE__, __LINE__, __PRETTY_FUNCTION__, __VA_ARGS__)
void ast_child_verbose(int level, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3)));
Modified: trunk/main/logger.c
URL: http://svn.digium.com/view/asterisk/trunk/main/logger.c?view=diff&rev=117693&r1=117692&r2=117693
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Wed May 21 17:34:27 2008
@@ -1156,7 +1156,7 @@
#endif
}
-void ast_verbose(const char *fmt, ...)
+void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...)
{
struct logmsg *logmsg = NULL;
struct ast_str *buf = NULL;
@@ -1198,7 +1198,7 @@
strcpy(logmsg->str, buf->str);
- ast_log(LOG_VERBOSE, "%s", logmsg->str + 1);
+ ast_log(__LOG_VERBOSE, file, line, func, "%s", logmsg->str + 1);
/* Set type */
logmsg->type = LOGMSG_VERBOSE;
Modified: trunk/utils/ael_main.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/ael_main.c?view=diff&rev=117693&r1=117692&r2=117693
==============================================================================
--- trunk/utils/ael_main.c (original)
+++ trunk/utils/ael_main.c Wed May 21 17:34:27 2008
@@ -108,7 +108,7 @@
void ast_context_destroy(void);
void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...);
char *ast_process_quotes_and_slashes(char *start, char find, char replace_with);
-void ast_verbose(const char *fmt, ...);
+void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...);
struct ast_app *pbx_findapp(const char *app);
void filter_leading_space_from_exprs(char *str);
void filter_newlines(char *str);
Modified: trunk/utils/hashtest.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/hashtest.c?view=diff&rev=117693&r1=117692&r2=117693
==============================================================================
--- trunk/utils/hashtest.c (original)
+++ trunk/utils/hashtest.c Wed May 21 17:34:27 2008
@@ -347,7 +347,7 @@
va_end(vars);
}
-void ast_verbose(const char *fmt, ...)
+void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...)
{
va_list vars;
va_start(vars,fmt);
Modified: trunk/utils/hashtest2.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/hashtest2.c?view=diff&rev=117693&r1=117692&r2=117693
==============================================================================
--- trunk/utils/hashtest2.c (original)
+++ trunk/utils/hashtest2.c Wed May 21 17:34:27 2008
@@ -359,7 +359,7 @@
va_end(vars);
}
-void ast_verbose(const char *fmt, ...)
+void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...)
{
va_list vars;
va_start(vars,fmt);
Modified: trunk/utils/refcounter.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/refcounter.c?view=diff&rev=117693&r1=117692&r2=117693
==============================================================================
--- trunk/utils/refcounter.c (original)
+++ trunk/utils/refcounter.c Wed May 21 17:34:27 2008
@@ -250,7 +250,7 @@
va_end(vars);
}
-void ast_verbose(const char *fmt, ...)
+void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...)
{
va_list vars;
va_start(vars,fmt);
More information about the asterisk-commits
mailing list