log.C File Reference

#include "Util/log.H"
#include "rutz/compat_snprintf.h"
#include "rutz/demangle.h"
#include "rutz/error_context.h"
#include <cerrno>
#include <cstdarg>
#include <cstdlib>
#include <cstdio>
#include <stdexcept>
#include <sys/types.h>
#include <unistd.h>
#include <cstring>
Include dependency graph for log.C:

Go to the source code of this file.

Defines

#define LBS   1024
 total max size of a log entry

Functions

void sendlog (const char *msg,...)
 Send a log. NON-GNUC, thread-unsafe version.
void report_current_exception (const int line, const char *file) throw ()
 Helper function for REPORT_CURRENT_EXCEPTION macro.

Variables

int LOG_FLAGS
 Bitwise-or'ed combination of above flags.
int MYLOGVERB = LOG_INFO
const char * MYLOGPREFIX = 0
 Null by default, but if set to non-null this string will be prefixed to every log message.
char MYLOGFUN [LBS2]
char MYLOGFIL [LBS2]
int MYLOGLIN
int MYLOGLEV
int MYLOGIDVAL
bool MYLOG_USEP
bool MYLOG_USEID

Detailed Description

Interface to syslog

Definition in file log.C.


Define Documentation

#define LBS   1024

total max size of a log entry

Definition at line 54 of file log.C.

Referenced by sendlog().


Function Documentation

void report_current_exception ( const int  line,
const char *  file 
) throw ()

Helper function for REPORT_CURRENT_EXCEPTION macro.

Definition at line 315 of file log.C.

References rutz::demangled_name().

void sendlog ( const char *  msg,
  ... 
)

Send a log. NON-GNUC, thread-unsafe version.

Definition at line 256 of file log.C.

References LBS, LBS2, LOG_FLAGS, and MYLOGVERB.


Variable Documentation

int LOG_FLAGS
Initial value:

Bitwise-or'ed combination of above flags.

Definition at line 56 of file log.C.

Referenced by main(), mexFunction(), and sendlog().

const char* MYLOGPREFIX = 0

Null by default, but if set to non-null this string will be prefixed to every log message.

This can be useful if you have multiple threads or multiple processes all writing to stdout, and you want to have some way to distinguish their log messages.

Definition at line 66 of file log.C.

int MYLOGVERB = LOG_INFO
Generated on Sun May 8 08:42:52 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3