Provide a C call to register a call back for logging. More...
Namespaces | |
namespace | blpapi |
Provide a C call to register a call back for logging.
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" { void myLoggerCallback(blpapi_UInt64_t threadId, int severity, blpapi_Datetime_t timestamp, const char *category, const char *message) { if (severity == blpapi_Logging_SEVERITY_FATAL) { // Do some logic for abort here } std::cout << severity << "-->" << message << std::endl; }
int main() { // .... blpapi_Logging_registerCallback(myLoggerCallback, blpapi_Logging_SEVERITY_TRACE); // .... }