Skip to content

Commit 31b2f9c

Browse files
zhhyu7xiaoxiang781216
authored andcommitted
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 <[email protected]>
1 parent 26e2e1e commit 31b2f9c

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

include/syslog.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@
5252
* LOG_PID - Include PID with each message.
5353
*/
5454

55+
#define LOG_PID 0x01 /* log the pid with each message */
56+
#define LOG_CONS 0x02 /* log on the console if errors in sending */
57+
#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
58+
#define LOG_NDELAY 0x08 /* don't delay open */
59+
#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
60+
#define LOG_PERROR 0x20 /* log to stderr as well */
61+
5562
/* Note: openlog() is not currently supported */
5663

5764
/* The facility argument is used to specify what type of program is logging
@@ -162,9 +169,8 @@ extern "C"
162169
*
163170
****************************************************************************/
164171

165-
#if 0 /* Not supported */
166-
void openlog(FAR const char *ident, int option, int facility);
167-
#endif
172+
/* Not supported */
173+
#define openlog(i, o, f) {(void)(i); (void)(o); (void)(f);}
168174

169175
/****************************************************************************
170176
* Name: closelog
@@ -176,9 +182,8 @@ void openlog(FAR const char *ident, int option, int facility);
176182
*
177183
****************************************************************************/
178184

179-
#if 0 /* Not supported */
180-
void closelog(void);
181-
#endif
185+
/* Not supported */
186+
#define closelog()
182187

183188
/****************************************************************************
184189
* Name: syslog and vsyslog

0 commit comments

Comments
 (0)