BLPAPI C++
3.24.11
|
Provide a C call to register a call back for logging. More...
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) |
int | blpapi_Logging_configureLogging (int level, const char *fileName, int rolloverFileCount, int rolloverFileLimit) |
void | blpapi_Logging_logTestMessage (blpapi_Logging_Severity_t severity) |
Provide a C call to register a call back for logging.
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.
int blpapi_Logging_configureLogging | ( | int | level, |
const char * | fileName, | ||
int | rolloverFileCount, | ||
int | rolloverFileLimit | ||
) |
Manually configure the logging options instead of going through environment variables such as 'BLPAPI_LOGLEVEL'.
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.
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.