exif-log.h File Reference

Log message infrastructure. More...

`#include <libexif/exif-mem.h>`
`#include <stdarg.h>`

Go to the source code of this file.

## Macros

#define | EXIF_LOG_NO_MEMORY(l, d, s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))

## Typedefs

typedef struct _ExifLog | ExifLog
| State maintained by the logging interface.
typedef void(* | ExifLogFunc) (ExifLog *log, ExifLogCode, const char *domain, const char *format, va_list args, void *data)
| Log callback function prototype.

## Enumerations

enum | ExifLogCode { EXIF_LOG_CODE_NONE , EXIF_LOG_CODE_DEBUG , EXIF_LOG_CODE_NO_MEMORY , EXIF_LOG_CODE_CORRUPT_DATA }

## Functions

ExifLog * | exif_log_new (void)
| Create a new logging instance.
ExifLog * | exif_log_new_mem (ExifMem *)
void | exif_log_ref (ExifLog *log)
void | exif_log_unref (ExifLog *log)
void | exif_log_free (ExifLog *log)
| Delete instance of ExifLog.
const char * | exif_log_code_get_title (ExifLogCode code)
| Return a textual description of the given class of error log.
const char * | exif_log_code_get_message (ExifLogCode code)
| Return a verbose description of the given class of error log.
void | exif_log_set_func (ExifLog *log, ExifLogFunc func, void *data)
| Register log callback function.
void | exif_log (ExifLog *log, ExifLogCode, const char *domain, const char *format,...)
void | exif_logv (ExifLog *log, ExifLogCode, const char *domain, const char *format, va_list args)

## Detailed Description

Log message infrastructure.

## Function Documentation

## exif_log_code_get_message()

const char * exif_log_code_get_message | ( | ExifLogCode | code | ) |

Return a verbose description of the given class of error log.

Parameters

  [in] | code | logging message class

Returns
  verbose description of the log class, or NULL if unknown

## exif_log_code_get_title()

const char * exif_log_code_get_title | ( | ExifLogCode | code | ) |

Return a textual description of the given class of error log.

Parameters

  [in] | code | logging message class

Returns
  textual description of the log class, or NULL if unknown

## exif_log_free()

void exif_log_free | ( | ExifLog * | log | ) |

Delete instance of ExifLog.

See also
  exif_log_new

Parameters

  [in] | log | ExifLog

Returns
  new instance of ExifLog

## exif_log_new()

ExifLog * exif_log_new | ( | void |  | ) |

Create a new logging instance.

See also
  exif_log_free

Returns
  new instance of ExifLog

## exif_log_set_func()

void exif_log_set_func | ( | ExifLog * | log,
|  | ExifLogFunc | func,
|  | void * | data
| ) |  |

Register log callback function.

Calls to the log callback function are purely for diagnostic purposes.

Parameters

  [in] | log | logging state variable
  [in] | func | callback function to set
  [in] | data | data to pass into callback function