log_rsrc_message_force

The log_rsrc_message_force method writes the logging message and level into the log file, regardless of the filter value of the log level.

The filter value of the log level determines what level of logging occurs, if any. You can set the filter value in the configuration file or by calling log_open() on the feed handler side. If the filter is set to exclude logging, this method overrides the filter and forces the messages into the log.

Syntax

uint16_t log_rsrc_message_force( const uint16_t level, const uint16_t err_num, log_rb_id rsrc_id, const char * msgKey, va_list& args)

Parameters

level

For this method, the log level is used primarily as informational display in the log file as the message is always written to the log file.

err_number

The error code of the error message being logged. For custom development, use error codes that are greater than or equal to 1000.

rsrc_id

The unique identifier for the resource bundle. This ID is passed to the log_init_resource API when initializing the resource bundle. For custom development, use IDs that are greater than or equal to 1000.

char * msgKey

A key, or pointer, to the message in the resource bundle. Each message in the resource bundle is paired with a key. Keys remain constant, and messages take custom or localized content. Key-message pairs take the following format:

MSG10101=Invalid message.

A pointer to the second operand for the comparison.

va_list& args

A variable number of arguments used for parameter substitution after the resource message has been retrieved. To specify the position of the parameter, use n$. For example:

MSG1023=Unable to load file %1$s.

Returns

uint16_t error_code(an error code) or ERROR_NONE (value 0).


Created March 26, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com