mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
drivers/syslog: syslog_initialize initialize dev/syslog too and call syslog to add the prefix and timestamp
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/syslog/syslog.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "syslog.h"
|
||||
|
||||
@@ -90,7 +90,8 @@ static const struct file_operations syslog_fops =
|
||||
static ssize_t syslog_chardev_write(FAR struct file *filep,
|
||||
FAR const char *buffer, size_t len)
|
||||
{
|
||||
return syslog_write(buffer, len);
|
||||
syslog(LOG_INFO, "%.*s", (int)len, buffer);
|
||||
return len;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user