Main Page | Modules | Data Structures | File List | Data Fields | Globals

gossip logging interface

This is a basic application logging facility. More...

Files

file  gossip.c
file  gossip.h

Functions

int gossip_enable_syslog (int priority)
int gossip_enable_stderr (void)
int gossip_enable_file (const char *filename, const char *mode)
int gossip_disable (void)
int gossip_set_debug_mask (int debug_on, uint64_t mask)
int gossip_get_debug_mask (int *debug_on, uint64_t *mask)
int gossip_err (const char *format,...)

Detailed Description

This is a basic application logging facility.

It uses printf style formatting and provides several mechanisms for output.


Function Documentation

int gossip_disable void   ) 
 

Turns off any active logging facility and disables debugging.

Returns:
0 on success, -errno on failure.

int gossip_enable_file const char *  filename,
const char *  mode
 

Turns on logging to a file.

The filename argument indicates which file to use for logging messages, and the mode indicates whether the file should be truncated or appended (see fopen() man page).

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int gossip_enable_stderr void   ) 
 

Turns on logging to stderr.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int gossip_enable_syslog int  priority  ) 
 

Turns on syslog logging facility.

The priority argument is a combination of the facility and level to use, as seen in the syslog(3) man page.

Returns:
0 on success, -errno on failure.

Here is the call graph for this function:

int gossip_err const char *  format,
... 
 

Logs a critical error message.

This will print regardless of the mask value and whether debugging is turned on or off, as long as some logging facility has been enabled.

Returns:
0 on success, -errno on failure.

int gossip_get_debug_mask int *  debug_on,
uint64_t *  mask
 

Fills in args indicating whether debugging is on or off, and what the mask level is.

Returns:
0 on success, -errno on failure.

int gossip_set_debug_mask int  debug_on,
uint64_t  mask
 

Determines whether debugging messages are turned on or off.

Also specifies the mask that determines which debugging messages are printed.

Returns:
0 on success, -errno on failure.


Generated on Tue Feb 7 02:44:08 2012 for PVFS by doxygen 1.3.5