include/razorback/log.h File Reference

The Razorback Logging API. More...

#include <syslog.h>
#include <razorback/visibility.h>
#include <razorback/types.h>
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  RZB_LOG_DEST_t { RZB_LOG_DEST_FILE, RZB_LOG_DEST_SYSLOG, RZB_LOG_DEST_ERR }
 

Log Destinations.

More...

Functions

SO_PUBLIC void rzb_log (unsigned level, const char *fmt,...)
 Log a message to the system message log.
SO_PUBLIC void rzb_log_remote (uint8_t level, struct EventId *eventId, const char *fmt,...)
SO_PUBLIC void rzb_perror (const char *message)
 Log a standard error.
SO_PUBLIC int rzb_get_log_level ()
 Get the currently configured log level.
SO_PUBLIC RZB_LOG_DEST_t rzb_get_log_dest ()
 Get the currently configured log destination.
SO_PUBLIC void rzb_debug_logging ()
 Set logging to debug mode.

Detailed Description

The Razorback Logging API.

Log levels avaliable are the same as the standard syslog log levels and definitions are imported from syslog.

Levels are: LOG_EMERGE LOG_ALERT LOG_CRIT LOG_ERR LOG_WARNING LOG_NOTICE LOG_INFO LOG_DEBUG


Enumeration Type Documentation

Log Destinations.

Enumerator:
RZB_LOG_DEST_FILE 

Write to a file.

RZB_LOG_DEST_SYSLOG 

Write to syslog.

RZB_LOG_DEST_ERR 

Write to stderr.


Function Documentation

SO_PUBLIC RZB_LOG_DEST_t rzb_get_log_dest (  ) 

Get the currently configured log destination.

Returns:
The current log distination.
SO_PUBLIC int rzb_get_log_level (  ) 

Get the currently configured log level.

Returns:
One of the log levels defined in syslog.h
SO_PUBLIC void rzb_log ( unsigned  level,
const char *  fmt,
  ... 
)

Log a message to the system message log.

Parameters:
level The message level as defined in syslog.h
fmt The format string for the message
... The data to be formatted.
SO_PUBLIC void rzb_perror ( const char *  message  ) 

Log a standard error.

Parameters:
message the log message associated with the error.
 All Data Structures Files Functions Variables Enumerations Enumerator Defines
Generated on Sun Dec 9 04:00:11 2012 for RazorbackAPI by  doxygen 1.6.3