diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 10:48:47 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 10:48:47 -0600 |
commit | 68c842108f9509299434ceb6f1595f0e4ddd4505 (patch) | |
tree | 67b2a6580906dcceba062e2b1bbe61943a209e7b /nuttx/include | |
parent | 35c393e9cec2ba7f9c85b03f4e6fe00d4db0afbd (diff) | |
download | px4-nuttx-68c842108f9509299434ceb6f1595f0e4ddd4505.tar.gz px4-nuttx-68c842108f9509299434ceb6f1595f0e4ddd4505.tar.bz2 px4-nuttx-68c842108f9509299434ceb6f1595f0e4ddd4505.zip |
Update ChangeLog
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/syslog.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/nuttx/include/syslog.h b/nuttx/include/syslog.h index 1773159a4..b9fe547ee 100644 --- a/nuttx/include/syslog.h +++ b/nuttx/include/syslog.h @@ -132,8 +132,28 @@ int syslog(int priority, FAR const char *format, ...); int vsyslog(int priority, FAR const char *src, va_list ap); #ifdef CONFIG_ARCH_LOWPUTC /* Non-standard */ +/* These are 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. + */ + int lowsyslog(int priority, FAR const char *format, ...); -int lowvsyslog(int priority, FAR const char *src, va_list ap); +int lowvsyslog(int priority, FAR const char *format, va_list ap); +#else +/* 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. + */ + +# 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 /* Enable or disable syslog output */ |