Classes | Namespaces | Typedefs | Functions

blpapi_logging.h File Reference

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

Go to the source code of this file.

Classes

struct  blpapi::Logging
struct  blpapi::Logging::Severity

Namespaces

namespace  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

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

Detailed Description

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


Typedef Documentation

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_EXPORT 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.

BLPAPI_EXPORT 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.