master
h 17 lines 755 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_LOG_FORWARDER_H
4 #define NETDATA_LOG_FORWARDER_H
5
6 #include "../common.h"
7
8 typedef struct LOG_FORWARDER LOG_FORWARDER;
9
10 LOG_FORWARDER *log_forwarder_start(void); // done once, at spawn_server_create()
11 void log_forwarder_add_fd(LOG_FORWARDER *lf, int fd); // to add a new fd
12 void log_forwarder_annotate_fd_name(LOG_FORWARDER *lf, int fd, const char *cmd); // set the syslog identifier
13 void log_forwarder_annotate_fd_pid(LOG_FORWARDER *lf, int fd, pid_t pid); // set the pid of the child process
14 bool log_forwarder_del_and_close_fd(LOG_FORWARDER *lf, int fd); // to remove an fd
15 void log_forwarder_stop(LOG_FORWARDER *lf); // done once, at spawn_server_destroy()
16
17 #endif //NETDATA_LOG_FORWARDER_H