libextractor  1.11
About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.
  Fossies Dox: libextractor-1.11.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

extractor_logging.h File Reference

logging API for GNU libextractor More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEBUG   0
 
#define LOG(...)
 
#define LOG_STRERROR(syscall)
 
#define LOG_STRERROR_FILE(syscall, filename)
 
#define ASSERT(cond)
 

Functions

void EXTRACTOR_abort_ (const char *file, int line)
 

Detailed Description

logging API for GNU libextractor

Author
Christian Grothoff

Definition in file extractor_logging.h.

Macro Definition Documentation

◆ ASSERT

#define ASSERT (   cond)
Value:
do { if (! (cond)) EXTRACTOR_abort_ (__FILE__, __LINE__); \
} while (0)
void EXTRACTOR_abort_(const char *file, int line)

Abort program if assertion fails.

Parameters
condassertion that must hold.

Definition at line 99 of file extractor_logging.h.

◆ DEBUG

#define DEBUG   0

Definition at line 28 of file extractor_logging.h.

◆ LOG

#define LOG (   ...)

Log a message.

Parameters
...format string and arguments for fmt (printf-style)

Definition at line 56 of file extractor_logging.h.

◆ LOG_STRERROR

#define LOG_STRERROR (   syscall)
Value:
LOG ("System call `%s' failed: %s\n", syscall, \
STRERROR (errno))
#define LOG(...)

Log an error message about a failed system/libc call using an error message based on 'errno'.

Parameters
syscallname of the syscall that failed

Definition at line 67 of file extractor_logging.h.

◆ LOG_STRERROR_FILE

#define LOG_STRERROR_FILE (   syscall,
  filename 
)
Value:
LOG ( \
"System call `%s' failed for file `%s': %s\n", syscall, filename, STRERROR ( \
errno))

Log an error message about a failed system/libc call involving a file using an error message based on 'errno'.

Parameters
syscallname of the syscall that failed
filenamename of the file that was involved

Definition at line 78 of file extractor_logging.h.

Function Documentation

◆ EXTRACTOR_abort_()

void EXTRACTOR_abort_ ( const char *  file,
int  line 
)

Abort the program reporting an assertion failure

Parameters
filefilename with the failure
lineline number with the failure

Definition at line 61 of file extractor_logging.c.

References ABORT.