syslog: add syslog option definition

adapts to third-party code compilation. in the process of porting ConnMan,
we encounter some situations where the structure is not defined, or the
returned data types do not match the expectations. Refer to the common
implementation of other systems and add relevant definitions.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2023-04-14 21:55:51 +08:00 committed by Xiang Xiao
parent 26e2e1e32f
commit 31b2f9c40c

View File

@ -52,6 +52,13 @@
* LOG_PID - Include PID with each message.
*/
#define LOG_PID 0x01 /* log the pid with each message */
#define LOG_CONS 0x02 /* log on the console if errors in sending */
#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
#define LOG_NDELAY 0x08 /* don't delay open */
#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
#define LOG_PERROR 0x20 /* log to stderr as well */
/* Note: openlog() is not currently supported */
/* The facility argument is used to specify what type of program is logging
@ -162,9 +169,8 @@ extern "C"
*
****************************************************************************/
#if 0 /* Not supported */
void openlog(FAR const char *ident, int option, int facility);
#endif
/* Not supported */
#define openlog(i, o, f) {(void)(i); (void)(o); (void)(f);}
/****************************************************************************
* Name: closelog
@ -176,9 +182,8 @@ void openlog(FAR const char *ident, int option, int facility);
*
****************************************************************************/
#if 0 /* Not supported */
void closelog(void);
#endif
/* Not supported */
#define closelog()
/****************************************************************************
* Name: syslog and vsyslog