Go to the documentation of this file. 1 #ifndef foodaemonloghfoo
2 #define foodaemonloghfoo
55 #if defined(__GNUC__) && ! defined(DAEMON_GCC_PRINTF_ATTR)
56 #define DAEMON_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
59 #define DAEMON_GCC_PRINTF_ATTR(a,b)
72 #define DAEMON_LOGV_AVAILABLE 1
92 #define DAEMON_SET_VERBOSITY_AVAILABLE 1
@ DAEMON_LOG_SYSLOG
Log messages are written to syslog.
void daemon_set_verbosity(int verbosity_prio)
Setter for the verbosity level of standard output.
enum daemon_log_flags daemon_log_use
This variable is used to specify the log target(s) to use.
const char * daemon_log_ident
Specifies the syslog identification, use daemon_ident_from_argv0() to set this to a sensible value or...
daemon_log_flags
Specifies where to send the log messages to.
void daemon_logv(int prio, const char *t, va_list ap)
Same as daemon_log(), but without variadic arguments.
@ DAEMON_LOG_STDOUT
Log messages are written to STDOUT.
@ DAEMON_LOG_STDERR
Log messages are written to STDERR.
#define DAEMON_GCC_PRINTF_ATTR(a, b)
A macro for making use of GCCs printf compilation warnings.
char * daemon_ident_from_argv0(char *argv0)
Return a sensible syslog identification for daemon_log_ident generated from argv[0].
void daemon_log(int prio, const char *t,...) DAEMON_GCC_PRINTF_ATTR(2
Log a message using printf format strings using the specified syslog priority.
@ DAEMON_LOG_AUTO
If this is set a daemon_fork() will change this to DAEMON_LOG_SYSLOG in the daemon process.