mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces.
This commit is contained in:
+5
-12
@@ -133,16 +133,9 @@
|
||||
#ifndef __arch_syslog
|
||||
# define __arch_syslog syslog
|
||||
#endif
|
||||
#ifndef __arch_lowsyslog
|
||||
# define __arch_lowsyslog lowsyslog
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_LOWPUTC
|
||||
# define _alert(format, ...) \
|
||||
__arch_lowsyslog(LOG_EMERG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# else
|
||||
# define _alert(x...)
|
||||
# endif
|
||||
#define _alert(format, ...) \
|
||||
__arch_syslog(LOG_EMERG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
|
||||
#ifdef CONFIG_DEBUG_ERROR
|
||||
# define _err(format, ...) \
|
||||
@@ -150,7 +143,7 @@
|
||||
|
||||
# ifdef CONFIG_ARCH_LOWPUTC
|
||||
# define _llerr(format, ...) \
|
||||
__arch_lowsyslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
__arch_syslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# else
|
||||
# define _llerr(x...)
|
||||
# endif
|
||||
@@ -165,7 +158,7 @@
|
||||
|
||||
# ifdef CONFIG_ARCH_LOWPUTC
|
||||
# define _llwarn(format, ...) \
|
||||
__arch_lowsyslog(LOG_WARNING, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
__arch_syslog(LOG_WARNING, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# else
|
||||
# define _llwarn(x...)
|
||||
# endif
|
||||
@@ -180,7 +173,7 @@
|
||||
|
||||
# ifdef CONFIG_ARCH_LOWPUTC
|
||||
# define _llinfo(format, ...) \
|
||||
__arch_lowsyslog(LOG_INFO, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
__arch_syslog(LOG_INFO, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
||||
# else
|
||||
# define _llinfo(x...)
|
||||
# endif
|
||||
|
||||
@@ -182,12 +182,7 @@ int ramlog_syslog_channel(void);
|
||||
* 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.
|
||||
* This is the low-level system logging interface.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
@@ -215,11 +215,11 @@ int syslog_flush(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: _vsyslog and _lowvsyslog
|
||||
* Name: _vsyslog
|
||||
*
|
||||
* Description:
|
||||
* _vsyslog() handles the system logging system calls. It is functionally
|
||||
* equivalent to vsyslog() except that the pre-process priority filtering
|
||||
* equivalent to vsyslog() except that the per-process priority filtering
|
||||
* has already been performed and, hence, there is no priority argument.
|
||||
*
|
||||
* NOTE: The va_list parameter is passed by reference. That is because
|
||||
@@ -229,7 +229,6 @@ int syslog_flush(void);
|
||||
****************************************************************************/
|
||||
|
||||
int _vsyslog(FAR const IPTR char *src, FAR va_list *ap);
|
||||
int _lowvsyslog(FAR const IPTR char *src, FAR va_list *ap);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -163,48 +163,6 @@ void closelog(void);
|
||||
int syslog(int priority, FAR const IPTR char *format, ...);
|
||||
int vsyslog(int priority, FAR const IPTR char *src, va_list ap);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lowsyslog and lowvsyslog
|
||||
*
|
||||
* Description:
|
||||
* syslog() generates a log message. The priority argument is formed by
|
||||
* ORing the facility and the level values (see include/syslog.h). The
|
||||
* remaining arguments are a format, as in printf and any arguments to the
|
||||
* format.
|
||||
*
|
||||
* This is a non-standard, low-level system logging interface. The
|
||||
* difference between syslog() and lowsyslog() is that the syslog()
|
||||
* interface writes to the syslog device (usually fd=1, stdout) whereas
|
||||
* lowsyslog() uses a lower level interface that works even from interrupt
|
||||
* handlers.
|
||||
*
|
||||
* If the platform cannot support lowsyslog, then we will substitute the
|
||||
* standard syslogging functions. These will, however, probably cause
|
||||
* problems if called from interrupt handlers, depending upon the nature of
|
||||
* the underlying syslog device.
|
||||
*
|
||||
* The function lowvsyslog() performs the same task as lowsyslog() with
|
||||
* the difference that it takes a set of arguments which have been
|
||||
* obtained using the stdarg variable argument list macros.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_LOWPUTC
|
||||
|
||||
int lowsyslog(int priority, FAR const IPTR char *format, ...);
|
||||
int lowvsyslog(int priority, FAR const IPTR char *format, va_list ap);
|
||||
|
||||
#else
|
||||
|
||||
# ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define lowsyslog(p,f,...) syslog(p,f,##__VA_ARGS__)
|
||||
# else
|
||||
# define lowsyslog (void)
|
||||
# endif
|
||||
# define lowvsyslog(p,f,a) vsyslog(p,f,a)
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setlogmask
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user