posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
syslog.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024, Meta
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
16#ifndef ZEPHYR_INCLUDE_POSIX_SYSLOG_H_
17#define ZEPHYR_INCLUDE_POSIX_SYSLOG_H_
18
19#include <stdarg.h>
20
23#define LOG_PID 1
25#define LOG_CONS 2
27#define LOG_NDELAY 4
29#define LOG_ODELAY 8
31#define LOG_NOWAIT 16
33#define LOG_PERROR 32
35#define LOG_KERN 0
36#define LOG_USER 1
37#define LOG_MAIL 2
38#define LOG_NEWS 3
39#define LOG_UUCP 4
40#define LOG_DAEMON 5
41#define LOG_AUTH 6
42#define LOG_CRON 7
43#define LOG_LPR 8
44#define LOG_LOCAL0 9
45#define LOG_LOCAL1 10
46#define LOG_LOCAL2 11
47#define LOG_LOCAL3 12
48#define LOG_LOCAL4 13
49#define LOG_LOCAL5 14
50#define LOG_LOCAL6 15
51#define LOG_LOCAL7 16
53#define LOG_EMERG 0
54#define LOG_ALERT 1
55#define LOG_CRIT 2
56#define LOG_ERR 3
57#define LOG_WARNING 4
58#define LOG_NOTICE 5
59#define LOG_INFO 6
60#define LOG_DEBUG 7
66#define LOG_MASK(mask) ((mask) & BIT_MASK(LOG_DEBUG + 1))
67
68#ifdef __cplusplus
69extern "C" {
70#endif
71
77void closelog(void);
78
87void openlog(const char *ident, int logopt, int facility);
88
96int setlogmask(int maskpri);
97
106void syslog(int priority, const char *message, ...);
107
116void vsyslog(int priority, const char *format, va_list ap);
117
118#ifdef __cplusplus
119}
120#endif
121
122#endif /* ZEPHYR_INCLUDE_POSIX_SYSLOG_H_ */
void openlog(const char *ident, int logopt, int facility)
Open a connection to the system logger.
void syslog(int priority, const char *message,...)
Write a message to the system logger.
void vsyslog(int priority, const char *format, va_list ap)
Write a message to the system logger (va_list form).
int setlogmask(int maskpri)
Set the log priority mask.
void closelog(void)
Close the connection to the system logger.