SYSLOG device channel: Pre-pending CR to LF is now a configuration option
This commit is contained in:
parent
82d746ec35
commit
9c87749afc
|
@ -48,7 +48,8 @@ config RAMLOG_CRLF
|
|||
bool "RAMLOG CR/LF"
|
||||
default n
|
||||
---help---
|
||||
Pre-pend a carriage return before every linefeed that goes into the RAM log.
|
||||
Pre-pend a carriage return before every linefeed that goes into the
|
||||
RAM log.
|
||||
|
||||
config RAMLOG_NONBLOCKING
|
||||
bool "RAMLOG non-block reads"
|
||||
|
@ -161,6 +162,14 @@ config CONSOLE_SYSLOG
|
|||
example, if the only console is a Telnet console. Then in that case,
|
||||
console output from non-Telnet threads will go to the syslog output.
|
||||
|
||||
config SYSLOG_CHAR_CRLF
|
||||
bool "SYSLOG device CR/LF"
|
||||
default y
|
||||
depends on SYSLOG_CHAR
|
||||
---help---
|
||||
Pre-pend a carriage return before every linefeed that goes to the
|
||||
character device.
|
||||
|
||||
config SYSLOG_DEVPATH
|
||||
string "System log device"
|
||||
default "/dev/syslog"
|
||||
|
|
|
@ -61,7 +61,9 @@
|
|||
|
||||
/* SYSLOG channel methods */
|
||||
|
||||
#ifdef CONFIG_SYSLOG_CHAR_CRLF
|
||||
static int syslog_devchan_putc(int ch);
|
||||
#endif
|
||||
static int syslog_devchan_force(int ch);
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -72,7 +74,11 @@ static int syslog_devchan_force(int ch);
|
|||
|
||||
static const struct syslog_channel_s g_syslog_dev_channel =
|
||||
{
|
||||
#ifdef CONFIG_SYSLOG_CHAR_CRLF
|
||||
syslog_devchan_putc,
|
||||
#else
|
||||
syslog_dev_putc,
|
||||
#endif
|
||||
syslog_devchan_force,
|
||||
syslog_dev_flush,
|
||||
};
|
||||
|
@ -89,6 +95,7 @@ static const struct syslog_channel_s g_syslog_dev_channel =
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SYSLOG_CHAR_CRLF
|
||||
static int syslog_devchan_putc(int ch)
|
||||
{
|
||||
int ret;
|
||||
|
@ -110,6 +117,7 @@ static int syslog_devchan_putc(int ch)
|
|||
|
||||
return syslog_dev_putc(ch);
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: syslog_devchan_force
|
||||
|
|
Loading…
Reference in New Issue