ENVISAT Product Reader API for C |

Functions
Logging

## Functions

int | epr_set_log_level (EPR_ELogLevel log_level)
| Sets the log level for the ENVISAT API.
void | epr_set_log_handler (EPR_FLogHandler log_handler)
| Sets the log handler for the ENVISAT API.
void | epr_log_message (EPR_ELogLevel log_level, const char *log_message)
| A default implementation for a logging function to be passed into the `epr_init()` function.

## Detailed Description

## Function Documentation

## ◆ epr_set_log_level()

int epr_set_log_level | ( | EPR_ELogLevel | log_level | ) |

Sets the log level for the ENVISAT API.

All logging messages with a log level lower than the given one, will be supressed, thus the log handler will not be called for such messages.

Parameters

  log_level | the new log level. All logging messages with a log level lower than the given one, will be supressed

Returns
  zero for success, an error code otherwise

## ◆ epr_set_log_handler()

void epr_set_log_handler | ( | EPR_FLogHandler | log_handler | ) |

Sets the log handler for the ENVISAT API.

Parameters

  log_handler | the log handler function pointer which will be used for logging, can be NULL, if logging shall be disabled

See also
  epr_log_message

## ◆ epr_log_message()

void epr_log_message | ( | EPR_ELogLevel | log_level,
|  | const char * | log_message
| ) |  |

A default implementation for a logging function to be passed into the `epr_init()` function.

The function writes to `stdout`, the format is: log_level date time log_message.

Parameters

  log_level | the log level
  log_message | the log message