1 /** \file daemon.h exported symbols from daemon.c */
4 void daemonize(bool parent_waits);
5 void daemon_open_log_or_die(void);
6 void daemon_close_log(void);
7 void log_welcome(const char *whoami);
8 void drop_privileges_or_die(const char *username, const char *groupname);
9 /** used for server_uptime() */
10 void set_server_start_time(const struct timeval *startuptime);
11 time_t get_server_uptime(const struct timeval *current_time);
12 __malloc char *get_server_uptime_str(const struct timeval *current_time);
13 void daemon_set_logfile(char *logfile_name);
14 void daemon_set_flag(unsigned flag);
15 void daemon_clear_flag(unsigned flag);
16 void daemon_set_loglevel(char *loglevel);
17 void daemon_set_default_log_colors(void);
18 void daemon_set_log_color_or_die(char const *arg);
19 __printf_2_3 void daemon_log(int ll, const char* fmt,...);
21 /** Daemon log configuration flags. */
23 /** Whether the hostname should be logged. */
25 /** Whether the PID should be logged. */
27 /** Prepend log message with date and time. */
29 /** Also print the loglevel for each message. */
31 /** Use colored output. */
33 /** Include milliseconds in log output. */