mirror of
https://github.com/apache/nuttx.git
synced 2026-10-12 00:30:23 +00:00
stream: Add syslogstream implementation
which forward the output to syslog Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
20ea607bd0
commit
0203839fa1
3 changed files with 122 additions and 1 deletions
|
|
@ -230,6 +230,12 @@ struct lib_bufferedoutstream_s
|
|||
* lib_outstream_s
|
||||
*/
|
||||
|
||||
struct lib_syslogstream_s
|
||||
{
|
||||
struct lib_outstream_s public;
|
||||
int priority;
|
||||
};
|
||||
|
||||
struct iob_s; /* Forward reference */
|
||||
|
||||
struct lib_syslograwstream_s
|
||||
|
|
@ -458,6 +464,24 @@ void lib_zeroinstream(FAR struct lib_instream_s *zeroinstream);
|
|||
void lib_nullinstream(FAR struct lib_instream_s *nullinstream);
|
||||
void lib_nulloutstream(FAR struct lib_outstream_s *nulloutstream);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lib_syslogstream
|
||||
*
|
||||
* Description:
|
||||
* Initializes syslog stream
|
||||
*
|
||||
* Input Parameters:
|
||||
* stream - User allocated, uninitialized instance of struct
|
||||
* lib_syslogstream_s to be initialized.
|
||||
* priority - log priority.
|
||||
*
|
||||
* Returned Value:
|
||||
* None (User allocated instance initialized).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void lib_syslogstream(FAR struct lib_syslogstream_s *stream, int priority);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lib_syslograwstream_open
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue