afc_log_fast

Name

afc_log_fast  -- Writes a log message to the standard error

Synopsis

int afc_log_fast ( AFC * afc, unsigned int error, const char * class_name, const char * funct_name, const char * info );

Description

This function is a reduced version of the standard afc_log() one. It takes few arguments and it is able to set the missing ones with defvault values. It is just a shorthand for the afc_log() since the original function is called by afc_log_fast once it has decided what is the log level and the text description for the error raised. You can call this function only with a defined set of standard errors, briefely described below, but mainly all the errors present in afc/base.h file.

Inputs

afc

Pointer to a valid afc instance.

error

The error code to raise. It can be one of the following:

  • AFC_ERR_NO_ERROR

  • AFC_ERR_NO_MEMORY

  • AFC_ERR_UNSUPPORTED_TAG

  • AFC_ERR_INVALID_POINTER

class_name

The name of the class raising the error.

funct_name

The name of the function raising the error.

info

Additional string for the error being raised.

Result

this function returns the same error passed in the 'error' parameter. This is useful in cases where you want to write stuff like: return ( afc_log_fast ( ... ) );

See Also