diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 19:37:10 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 19:37:10 -0600 |
commit | 42b35d7ff6526a7d2b3521d969ac3c6a4e00ccae (patch) | |
tree | 7f527d7d7360a2500f321f414402644b03ea8837 /nuttx/include/syslog.h | |
parent | ed717b37b0161e4989f04ae3f7f75df3f66724b5 (diff) | |
download | px4-nuttx-42b35d7ff6526a7d2b3521d969ac3c6a4e00ccae.tar.gz px4-nuttx-42b35d7ff6526a7d2b3521d969ac3c6a4e00ccae.tar.bz2 px4-nuttx-42b35d7ff6526a7d2b3521d969ac3c6a4e00ccae.zip |
Add syslog system calls
Diffstat (limited to 'nuttx/include/syslog.h')
-rw-r--r-- | nuttx/include/syslog.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/nuttx/include/syslog.h b/nuttx/include/syslog.h index e57595fe1..3922320e4 100644 --- a/nuttx/include/syslog.h +++ b/nuttx/include/syslog.h @@ -49,6 +49,19 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ +/* Some interfaces in this file are currently only available within the + * kernel. They could are available to applicaions in the flat build and + * could be made available in the protected and kernel builds IF system + * calls were added. + */ + +#if !defined(CONFIG_BUILD_PROTECTED) && !defined(CONFIG_BUILD_KERNEL) +# undef __KERNEL__ +# define __KERNEL__ 1 +#endif + +/* syslog interface *********************************************************/ /* The option argument to openlog() is an OR of any of these: * * LOG_CONS - Write directly to system console if there is an error @@ -136,7 +149,7 @@ void closelog(void); 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 */ +#ifdef CONFIG_ARCH_LOWPUTC /* 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 @@ -167,9 +180,9 @@ int lowvsyslog(int priority, FAR const char *format, va_list ap); int setlogmask(int mask); -/* Enable or disable syslog output */ +#if defined(CONFIG_SYSLOG_ENABLE) && defined(__KERNEL__) +/* Non-standard interface to enable or disable syslog output */ -#ifdef CONFIG_SYSLOG_ENABLE /* Non-standard */ void syslog_enable(bool enable); #endif |