From 4a2b84469e41786a2cde2b59447f0f135a99e614 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Thu, 30 Jun 2016 09:14:55 +1000 Subject: Default syslog priority to INFO. Add rtems_setlogpriority to configure the priority. The rc.conf has 'syslog_priority' where the priority is the name, eg syslog_priority="debug" sets the priority to "debug". --- rtemsbsd/include/rtems/bsd/bsd.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rtemsbsd/include') diff --git a/rtemsbsd/include/rtems/bsd/bsd.h b/rtemsbsd/include/rtems/bsd/bsd.h index 1583dc9e..f687eaf6 100644 --- a/rtemsbsd/include/rtems/bsd/bsd.h +++ b/rtemsbsd/include/rtems/bsd/bsd.h @@ -221,6 +221,15 @@ void rtems_bsd_set_vprintf_handler(int (*new_vprintf_handler) */ int rtems_bsd_vprintf(int level, const char *fmt, va_list ap); +/** + * @brief Set the syslog priority. See syslog.h for the names. + * + * @param priority One of the standard names. + * @retval 0 Priority set. + * @retval errno Otherwise. + */ +int rtems_bsd_setlogpriority(const char* priority); + /** @} */ #ifdef __cplusplus -- cgit v1.2.3