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".
This commit is contained in:
Chris Johns
2016-06-30 09:14:55 +10:00
parent 90873cc802
commit 4a2b84469e
2 changed files with 40 additions and 6 deletions

View File

@@ -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