LWL v1.0.0 - Reference Manual


extern void lwl_write_log

(lwlh_t HANDLE, lwl_priority_t PRI,
  char* FORMAT, ... )

Log a message to the files associated to a LWL handle.

Documentation

Log a message to the files associated to a LWL handle. Write the given formated message of priority PRI to the HANDLE's files. To change the HANDLE's files, you can use lwl_set_attributes() function. If no files were specified by LWL_TAG_FILE_xxx tags, then all logs are written to the file specified by LWL_TAG_FILE (or to the default one if no LWL_TAG_FILE was specified). If a file was specified for a given level, by use of tags like LWL_TAG_FILE_xxx, then the specified file is used instead of the default one. The message FORMAT must be used like printf(). The message will be logged only if PRI is <= HANDLE's log level (wich you can consult with lwl_get_log_level()). To change HANDLE's log level, you can use lwl_set_attributes() function.

Example:

lwl_write_log (my_handle, LWL_PRI_DEBUG, "%s:%d-%s ERROR", __FILE__, __LINE__, __FUNCTION__);

Parameters:
HANDLE - The LWL handle to use.
PRI - The priority of the message to log.
FORMAT - The message to log.
... - Variables to include into the message.
Preconditions:
HANDLE must be a LWL handle successfully allocated by lwl_alloc().
See Also:
lwl_get_log_level
lwl_set_attributes

Alphabetic index


LWL v1.0.0 Reference Manual Generation date: Wed Nov 13 15:07:15 CET 2002