mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
There is now one-and-only-one copy of syslog_putc. It is in the SYSLOG channel logic and can redirect syslog output as needed. All former syslog_putc versions were renamed and the corresponding SYSLOG device initializaiton now calls syslog_channel()
This commit is contained in:
@@ -183,7 +183,7 @@ int ramlog_consoleinit(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ramlog_syslog_initialize
|
||||
* Name: ramlog_syslog_channel
|
||||
*
|
||||
* Description:
|
||||
* Create the RAM logging device and register it at the specified path.
|
||||
@@ -195,7 +195,24 @@ int ramlog_consoleinit(void);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||
int ramlog_syslog_initialize(void);
|
||||
int ramlog_syslog_channel(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ramlog_putc
|
||||
*
|
||||
* Description:
|
||||
* This is the low-level system logging interface. The debugging/syslogging
|
||||
* interfaces are syslog() and lowsyslog(). The difference is that
|
||||
* the syslog() internface writes to syslog device (usually fd=1, stdout)
|
||||
* whereas lowsyslog() uses a lower level interface that works from
|
||||
* interrupt handlers. This function is a a low-level interface used to
|
||||
* implement lowsyslog() when CONFIG_RAMLOG_SYSLOG=y and CONFIG_SYSLOG=y
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG)
|
||||
int ramlog_putc(int ch);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
* CONFIG_SYSLOG_DEVPATH - The full path to the system logging device
|
||||
*
|
||||
* In addition, some SYSLOG device must also be enabled that will provide
|
||||
* the syslog_putc() function. As of this writing, there are two SYSLOG
|
||||
* the syslog output "channel. As of this writing, there are two SYSLOG
|
||||
* devices avaiable:
|
||||
*
|
||||
* 1. A RAM SYSLOGing device that will log data into a circular buffer
|
||||
@@ -191,23 +191,6 @@ int syslog_initialize(void);
|
||||
# define syslog_initialize()
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: syslog_putc
|
||||
*
|
||||
* Description:
|
||||
* This is the low-level system logging interface.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ch - The character to add to the SYSLOG (must be positive).
|
||||
*
|
||||
* Returned Value:
|
||||
* On success, the character is echoed back to the caller. A negated
|
||||
* errno value is returned on any failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int syslog_putc(int ch);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: syslog_flush
|
||||
*
|
||||
|
||||
@@ -51,10 +51,10 @@
|
||||
/* Configuration ************************************************************/
|
||||
/* CONFIG_SYSLOG_CONSOLE - Use the syslog logging output as a system console.
|
||||
* If this feature is enabled (along with CONFIG_DEV_CONSOLE), then all
|
||||
* console output will be re-directed to a syslog_putc function. This
|
||||
* console output will be re-directed to the SYSLOG output channel. This
|
||||
* is useful, for example, if the only console is a Telnet console. Then
|
||||
* in that case, console output from non-Telnet threads will go to the
|
||||
* syslog_putc output.
|
||||
* SYSLOG output channel.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DEV_CONSOLE
|
||||
|
||||
Reference in New Issue
Block a user