summaryrefslogtreecommitdiff
path: root/pjlib/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-10-25 08:46:40 +0000
committerBenny Prijono <bennylp@teluu.com>2009-10-25 08:46:40 +0000
commit2053af19e76b9c13e8bdebb13669cf915dc49981 (patch)
tree90a5205eb3899228dd5178d90991edcf09fdcc7c /pjlib/include
parenta00a374e09c6fc58141faf74cf3789366e8ca25f (diff)
Ticket #981: new pj_perror() utility API
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2965 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include')
-rw-r--r--pjlib/include/pj/errno.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/pjlib/include/pj/errno.h b/pjlib/include/pj/errno.h
index 07cdcf8a..8b536c40 100644
--- a/pjlib/include/pj/errno.h
+++ b/pjlib/include/pj/errno.h
@@ -112,6 +112,27 @@ PJ_DECL(pj_str_t) pj_strerror( pj_status_t statcode,
char *buf, pj_size_t bufsize);
/**
+ * Print the error message pertaining to the specified error code to
+ * the log.
+ *
+ * @param log_level The log will be printed at this log level.
+ * @param sender The log sender string.
+ * @param status The error code which error message will be printed.
+ * @param title String to be printed before the error message. Note
+ * that a colon will be added automatically between
+ * this string and the error message.
+ * @param options Options, currently must be zero.
+ */
+#if PJ_LOG_MAX_LEVEL >= 1
+PJ_DECL(void) pj_perror(int log_level, const char *sender,
+ pj_status_t status, const char *title,
+ int options);
+#else
+# define pj_perror(level, sender, status, title, options)
+#endif /* #if PJ_LOG_MAX_LEVEL >= 1 */
+
+
+/**
* Type of callback to be specified in #pj_register_strerror()
*
* @param e The error code to lookup.