enesim  0.0.23.1
Drawinglibrary
Defines | Typedefs | Functions
Log

Logging. More...

Defines

#define ENESIM_LOG(log, fmt,...)   (enesim_log_add_parametric(log, __FILE__, __FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)

Typedefs

typedef struct _Enesim_Log Enesim_Log

Functions

EAPI Enesim_Logenesim_log_ref (Enesim_Log *log)
 Increase the reference counter of a log.
EAPI void enesim_log_unref (Enesim_Log *log)
 Decrease the reference counter of a log.
EAPI Enesim_Logenesim_log_add (Enesim_Log *log, const char *str)
 Add an log string to the list of defined logs.
EAPI Enesim_Logenesim_log_add_parametric (Enesim_Log *log, const char *file, const char *function, int line, char *fmt, va_list args)
 Add a log to the list of defined logs with a formatted description.
EAPI void enesim_log_dump (const Enesim_Log *log)
 Display in the standard output the given logs.

Detailed Description

Logging.


Define Documentation

#define ENESIM_LOG (   log,
  fmt,
  ... 
)    (enesim_log_add_parametric(log, __FILE__, __FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)

Calls enesim_log_add_parametric() with current file, function and line.

See also:
enesim_log_add_parametric()

Typedef Documentation

typedef struct _Enesim_Log Enesim_Log

Log Handle


Function Documentation

Increase the reference counter of a log.

Parameters:
[in]logThe renderer
Returns:
The input parameter log for programming convenience
See also:
enesim_log_unref()
EAPI void enesim_log_unref ( Enesim_Log log)

Decrease the reference counter of a log.

Parameters:
[in]logThe renderer
See also:
enesim_log_ref()
EAPI Enesim_Log* enesim_log_add ( Enesim_Log log,
const char *  str 
)

Add an log string to the list of defined logs.

Parameters:
logThe list of logs.
strThe log description.
Returns:
The new list of logs.

This function add the description string to the list or logs log. If string is NULL, NULL is returned. if log is NULL, an Enesim_Log is allocated. string is added to log. On memory allocation log, NULL is returned, otherwise log is returned.

See also:
enesim_log_add_parametric()
EAPI Enesim_Log* enesim_log_add_parametric ( Enesim_Log log,
const char *  file,
const char *  function,
int  line,
char *  fmt,
va_list  args 
)

Add a log to the list of defined logs with a formatted description.

Parameters:
logThe list of logs.
fileThe file where the log occurs.
functionThe function where the log occurs.
lineThe line of the file where the log occurs.
fmtFormatted string passed to vsnprintf().
argsThe list of arguments for the format
Returns:
The new list of logs.

This function formats the description of the log with file, function and line and calls enesim_log_add() with the built string. User defined description can be appended with fmt.

See also:
enesim_log_add()
EAPI void enesim_log_dump ( const Enesim_Log log)

Display in the standard output the given logs.

Parameters:
logThe list of logs to display.

This function displays in the standard output the list of logs stored in log. if log is NULL, this function returns immediatly.

 All Data Structures Variables