Provide a C call to register a call back for logging.
More...
Provide a C call to register a call back for logging.
- Purpose:
- Provide a C call to register a call back for logging
-
- Description:
- This component provides a C function that is used to register a callback for logging
-
- Usage:
- To use the call back a function needs to be created with the same definition of blpapi_Logging_Func_t. The callback will be called for all the log messages that have severity greater than or equal to the specified
thresholdSeverity. A callback can be registered multiple number of times but only the last registered callback will be used. Registering with a NULL callback will de-register the callback. extern "C" {
int severity,
const char *category,
const char *message)
{
}
std::cout << severity << "-->" << message << std::endl;
}
unsigned long long blpapi_UInt64_t
Definition blpapi_types.h:70
@ blpapi_Logging_SEVERITY_FATAL
Definition blpapi_types.h:118
Definition blpapi_datetime.h:102
This callback needs to be registered with the library as int main() {
}
BLPAPI_EXPORT int blpapi_Logging_registerCallback(blpapi_Logging_Func_t callback, blpapi_Logging_Severity_t thresholdSeverity)
@ blpapi_Logging_SEVERITY_TRACE
Definition blpapi_types.h:123