BLPAPI C++  3.22.1
blpapi_logging.h File Reference

Provide a C call to register a call back for logging. More...

#include <blpapi_call.h>
#include <blpapi_datetime.h>
#include <blpapi_defs.h>

Go to the source code of this file.

Classes

struct  Logging
 
struct  Logging::Severity
 

Namespaces

 BloombergLP
 
 BloombergLP::blpapi
 

Typedefs

typedef void(* blpapi_Logging_Func_t) (blpapi_UInt64_t threadId, int severity, blpapi_Datetime_t timestamp, const char *category, const char *message)
 

Functions

int blpapi_Logging_registerCallback (blpapi_Logging_Func_t callback, blpapi_Logging_Severity_t thresholdSeverity)
 
void blpapi_Logging_logTestMessage (blpapi_Logging_Severity_t severity)
 

Detailed Description

Provide a C call to register a call back for logging.

Typedef Documentation

◆ blpapi_Logging_Func_t

typedef void(* blpapi_Logging_Func_t) (blpapi_UInt64_t threadId, int severity, blpapi_Datetime_t timestamp, const char *category, const char *message)

Provide a type definition for the callback that will be called when a message is logged. The specified threadId is the id of the calling thread. The specified severity is the severity of the log message whose value is defined by the type blpapi_Logging_Severity_t. The specified timestamp is the date and time the message is logged. The specified category identifies the source of the logged message. The specified message is the actual log message text.

Function Documentation

◆ blpapi_Logging_logTestMessage()

void blpapi_Logging_logTestMessage ( blpapi_Logging_Severity_t  severity)

Log a test message at the specified severity. Note that this function is intended for testing of the logging configuration only.

◆ blpapi_Logging_registerCallback()

int blpapi_Logging_registerCallback ( blpapi_Logging_Func_t  callback,
blpapi_Logging_Severity_t  thresholdSeverity 
)

Register the specified callback that will be called for all log messages with severity greater than or equal to the specified thresholdSeverity. The callback needs to be registered before the start of all sessions. If this function is called multiple times, only the last registered callback will take effect. Registering with a NULL callback will de-register the callback. 0 is returned if callback is registered and a non-zero otherwise.