OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Logging

Functions

int epr_set_log_level (EPR_ELogLevel log_level)
 
void epr_set_log_handler (EPR_FLogHandler log_handler)
 
void epr_log_message (EPR_ELogLevel log_level, const char *log_message)
 

Detailed Description

Function Documentation

◆ 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_levelthe log level
log_messagethe log message

Definition at line 121 of file epr_api.c.

◆ epr_set_log_handler()

void epr_set_log_handler ( EPR_FLogHandler  log_handler)

Sets the log handler for the ENVISAT API.

Parameters
log_handlerthe log handler function pointer which will be used for logging, can be NULL, if logging shall be disabled
See also
epr_log_message

Sets the log handler for the ENVISAT API.

Parameters
log_handlerthe new log handler (function pointer), can be NULL, if logging shall be disabled
Returns
zero for success, an error code otherwise

Definition at line 115 of file epr_api.c.

◆ 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_levelthe 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