flux_log(3)
SYNOPSIS
#include <flux/core.h>
int flux_vlog (flux_t *h, int level, const char *fmt, va_list ap);
int flux_log (flux_t *h, int level, const char *fmt, ...);
void flux_log_set_appname (flux_t *h, const char *s);
void flux_log_set_procid (flux_t *h, const char *s);
Link with -lflux-core.
DESCRIPTION
flux_log() sends log messages to the Flux broker connected to h.
If h is NULL, the log message is output to stderr. The broker log
service is described in the LOGGING section of
flux-broker(1).
The level parameter should be set to one of the syslog(3)
severity levels. The levels are listed in the aforementioned description.
flux_log_set_procid() may be used to override the default procid,
which is initialized to the calling process's PID.
flux_log_set_appname() may be used to override the default
application name, which is initialized to the value of the __progname
symbol (normally the argv[0] program name).
RETURN VALUE
flux_log() normally returns 0 on success, or -1 if there was
a problem building or sending the log message, with errno set.
ERRORS
- EPERM
The user does not have permission to log messages to this Flux instance.
- ENOMEM
Out of memory.
RESOURCES
Flux: http://flux-framework.org
Flux RFC: https://flux-framework.readthedocs.io/projects/flux-rfc
Issue Tracker: https://github.com/flux-framework/flux-core/issues