XBEE_LOGLEVELGET(3)

NAME
xbee_logLevelGet, xbee_logLevelSet, xbee_logTargetGet, xbee_logTargetSet

SYNOPSIS
#include <xbee.h>

xbee_err xbee_logLevelGet(struct xbee *xbee, int *level);

xbee_err xbee_logLevelSet(struct xbee *xbee, int level);

xbee_err xbee_logTargetGet(struct xbee *xbee, FILE **f);

xbee_err xbee_logTargetSet(struct xbee *xbee, FILE *f);

DESCRIPTION
These functions allow you to configure and retrieve the logging options for an instance of libxbee.

The level may be any number, and indicates the verbosity of log messages. A higher number will generate a more verbose output. See xbee_log(3) for more details on how this affects log output.

You may redirect the log output using xbee_logTargetSet(). f must be an open file descriptor that will allow writing.

By default, libxbee will log to stderr.

  Return Value
On success these functions will return XBEE_ENONE, otherwise an error number from enum xbee_errors (as specified in <xbee.h>)

EXAMPLE
#include <xbee.h>
struct xbee *xbee;
FILE *log;
/* initialize xbee, using xbee_setup() */
if ((log = fopen("libxbee.log", "w")) == NULL) return;
if (xbee_logTargetSet(xbee, log) != XBEE_ENONE) return;
if (xbee_logLevelSet(xbee, 100) != XBEE_ENONE) return;

AUTHOR
Attie Grande <attie@attie.co.uk>

SEE ALSO
libxbee(3), xbee_setup(3), xbee_log(3)