diff options
author | Sean Bright <sean@malleable.com> | 2009-06-26 13:00:35 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2009-06-26 13:00:35 +0000 |
commit | e06c6f97c4c222b4c802ac2b85f76a331991dffb (patch) | |
tree | cf899397858448eeb10dc0ebc2d020e36884997e /include/asterisk | |
parent | 2f88262abb9d7a03bb60caef56ffa7f69e5e48c5 (diff) |
Add functions to map syslog facilities and priorities constants to strings.
Also change the default casing of the string contants to lowercase. This really
just saves us from have to lowercase them later when displaying them.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/syslog.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asterisk/syslog.h b/include/asterisk/syslog.h index ca8ea8fc6..26d4e2573 100644 --- a/include/asterisk/syslog.h +++ b/include/asterisk/syslog.h @@ -42,6 +42,17 @@ int ast_syslog_facility(const char *facility); /*! * \since 1.6.3 + * \brief Maps a syslog facility constant to a string. + * + * \param facility syslog facility constant to map (i.e. LOG_DAEMON) + * + * \retval facility name (i.e. "daemon") if found + * \retval NULL if facility is not found + */ +const char *ast_syslog_facility_name(int facility); + +/*! + * \since 1.6.3 * \brief Maps a syslog priority name from a string to a syslog priority * constant. * @@ -54,6 +65,17 @@ int ast_syslog_priority(const char *priority); /*! * \since 1.6.3 + * \brief Maps a syslog priority constant to a string. + * + * \param priority syslog priority constant to map (i.e. LOG_NOTICE) + * + * \retval priority name (i.e. "notice") if found + * \retval NULL if priority is not found + */ +const char *ast_syslog_priority_name(int priority); + +/*! + * \since 1.6.3 * \brief Maps an Asterisk log level (i.e. LOG_ERROR) to a syslog priority * constant. * |