Go to the source code of this file.
Macros | |
#define | SL_TOPIC_USAGE_LOG "SL_TOPIC_USAGE_LOG" |
#define | STATS_TOPIC "STATS_TOPIC" |
Typedefs | |
typedef enum mamaSlEvent_ | mamaSlEvent |
The event types handled by the stats logger. | |
typedef enum mamaSlSubFailReason_ | mamaSlSubFailReason |
The reasons for a subscription to fail. |
Enumerations | |
enum | mamaSlEvent_ { MAMA_SL_EVENT_LOGIN = 0, MAMA_SL_EVENT_LOGOUT = 1, MAMA_SL_EVENT_SUB_CREATE = 2, MAMA_SL_EVENT_SUB_FAIL = 3, MAMA_SL_EVENT_SUB_DESTROY = 4, MAMA_SL_EVENT_SUB_ENT_PASS = 5 } |
The event types handled by the stats logger. More... | |
enum | mamaSlSubFailReason_ { MAMA_SL_SUB_FAIL_REGEX = 0, MAMA_SL_SUB_FAIL_CODE = 1, MAMA_SL_SUB_FAIL_TIMEOUT = 2, MAMA_SL_SUB_FAIL_NOT_FOUND = 3 } |
The reasons for a subscription to fail. More... |
Functions | |
MAMAExpDLL const char * | mamaStatsLogger_eventToString (mamaSlEvent event) |
Convert a mamaSlEvent value to a string. | |
MAMAExpDLL const char * | mamaStatsLogger_subFailReasonToString (mamaSlSubFailReason subFailReason) |
Convert a mamaSlSubFailReason value to a string. | |
MAMAExpDLL mama_status | mamaStatsLogger_allocate (mamaStatsLogger *logger) |
Allocate memory for a new stats logger. | |
MAMAExpDLL mama_status | mamaStatsLogger_create (mamaStatsLogger logger, mamaQueue queue, mamaTransport tport) |
Create and activate mamaStatsLogger object. | |
MAMAExpDLL mama_status | mamaStatsLogger_createForStats (mamaStatsLogger logger, mamaQueue queue, mamaTransport tport, const char *topic) |
MAMAExpDLL mama_status | mamaStatsLogger_destroy (mamaStatsLogger logger) |
Destroy a mamaStatsLogger object, freeing any memory. | |
MAMAExpDLL mama_status | mamaStatsLogger_setReportInterval (mamaStatsLogger logger, mama_f64_t interval) |
Set the reporting interval. | |
MAMAExpDLL mama_status | mamaStatsLogger_setReportSize (mamaStatsLogger logger, mama_size_t numEvents) |
Set the maximum number of events to cache before reporting. | |
MAMAExpDLL mama_status | mamaStatsLogger_setUserName (mamaStatsLogger logger, const char *userName) |
Set the userName. | |
MAMAExpDLL mama_status | mamaStatsLogger_getUserName (const mamaStatsLogger logger, const char **userName) |
Get the userName. | |
MAMAExpDLL mama_status | mamaStatsLogger_setHostName (mamaStatsLogger logger, const char *hostName) |
Set the hostName. | |
MAMAExpDLL mama_status | mamaStatsLogger_getHostName (const mamaStatsLogger logger, const char **hostName) |
Get the hostName. | |
MAMAExpDLL mama_status | mamaStatsLogger_setApplicationName (mamaStatsLogger logger, const char *appName) |
Set the applicationName. | |
MAMAExpDLL mama_status | mamaStatsLogger_getApplicationName (const mamaStatsLogger logger, const char **appName) |
Get the applicationName. | |
MAMAExpDLL mama_status | mamaStatsLogger_setApplicationClass (mamaStatsLogger logger, const char *applClass) |
Set the applicationClass. | |
MAMAExpDLL mama_status | mamaStatsLogger_getApplicationClass (const mamaStatsLogger logger, const char **appClass) |
Get the applicationClass. | |
MAMAExpDLL mama_status | mamaStatsLogger_setIpAddress (mamaStatsLogger logger, const char *ipAddress) |
Set the ipAddress. | |
MAMAExpDLL mama_status | mamaStatsLogger_getIpAddress (const mamaStatsLogger logger, const char **ipAddress) |
Get the ipAddress. | |
MAMAExpDLL mama_status | mamaStatsLogger_logLogin (mamaStatsLogger logger) |
Log a login event. | |
MAMAExpDLL mama_status | mamaStatsLogger_logLogout (mamaStatsLogger logger) |
Log a logout event. | |
MAMAExpDLL mama_status | mamaStatsLogger_logSubscriptionEntitlePass (mamaStatsLogger logger, mamaSubscription subscription, int32_t entitleCode) |
Log a subscription entitlement check pass event. | |
MAMAExpDLL mama_status | mamaStatsLogger_logSubscriptionFail (mamaStatsLogger logger, mamaSubscription subscription, mamaSlSubFailReason reason) |
Log a subscription fail event. | |
MAMAExpDLL mama_status | mamaStatsLogger_logSubscriptionDestroy (mamaStatsLogger logger, mamaSubscription subscription) |
Log a subscription destroy event. | |
MAMAExpDLL mama_status | mamaStatsLogger_addStatMsg (mamaStatsLogger *logger, mamaMsg msg) |
MAMAExpDLL mama_status | mamaStatsLogger_sendReport (mamaStatsLogger *logger) |
MAMAExpDLL mama_status | mamaStatsLogger_getLogMsgStats (mamaStatsLogger logger, mama_bool_t *logMsgStats) |
MAMAExpDLL mama_status | mamaStatsLogger_setLogMsgStats (mamaStatsLogger logger, mama_bool_t logMsgStats) |
MAMAExpDLL mama_status | mamaStatsLogger_incMsgCount (mamaStatsLogger statsLogger) |
#define SL_TOPIC_USAGE_LOG "SL_TOPIC_USAGE_LOG" |
#define STATS_TOPIC "STATS_TOPIC" |
typedef enum mamaSlEvent_ mamaSlEvent |
The event types handled by the stats logger.
typedef enum mamaSlSubFailReason_ mamaSlSubFailReason |
The reasons for a subscription to fail.
enum mamaSlEvent_ |
The event types handled by the stats logger.
enum mamaSlSubFailReason_ |
MAMAExpDLL const char* mamaStatsLogger_eventToString | ( | mamaSlEvent | event | ) |
Convert a mamaSlEvent value to a string.
Do no attempt to free the string result.
event | The mamaSlEvent to convert. |
MAMAExpDLL const char* mamaStatsLogger_subFailReasonToString | ( | mamaSlSubFailReason | subFailReason | ) |
Convert a mamaSlSubFailReason value to a string.
Do no attempt to free the string result.
subFailReason | The mamaSlSubFailReason to convert. |
MAMAExpDLL mama_status mamaStatsLogger_allocate | ( | mamaStatsLogger * | logger | ) |
Allocate memory for a new stats logger.
The logger is not actually created until a call the create() functions is made. Memory must be freed using the mamaStatsLogger_Deallocate()
function.
logger | Where the address of the new logger will be written |
MAMAExpDLL mama_status mamaStatsLogger_create | ( | mamaStatsLogger | logger, |
mamaQueue | queue, | ||
mamaTransport | tport | ||
) |
Create and activate mamaStatsLogger object.
logger | The location of a mamaStatsLogger |
queue | The queue for the Stats Logger to use for publishing |
tport | the transport |
MAMAExpDLL mama_status mamaStatsLogger_createForStats | ( | mamaStatsLogger | logger, |
mamaQueue | queue, | ||
mamaTransport | tport, | ||
const char * | topic | ||
) |
MAMAExpDLL mama_status mamaStatsLogger_destroy | ( | mamaStatsLogger | logger | ) |
Destroy a mamaStatsLogger object, freeing any memory.
logger | The location of a mamaStatsLogger |
MAMAExpDLL mama_status mamaStatsLogger_setReportInterval | ( | mamaStatsLogger | logger, |
mama_f64_t | interval | ||
) |
Set the reporting interval.
logger | The location of a mamaStatsLogger |
interval | The report interval in seconds |
MAMAExpDLL mama_status mamaStatsLogger_setReportSize | ( | mamaStatsLogger | logger, |
mama_size_t | numEvents | ||
) |
Set the maximum number of events to cache before reporting.
logger | The location of a mamaStatsLogger |
numEvents | The number of events to report after |
MAMAExpDLL mama_status mamaStatsLogger_setUserName | ( | mamaStatsLogger | logger, |
const char * | userName | ||
) |
Set the userName.
logger | The logger object to update. |
userName | The user name for the logger |
MAMAExpDLL mama_status mamaStatsLogger_getUserName | ( | const mamaStatsLogger | logger, |
const char ** | userName | ||
) |
Get the userName.
logger | The logger object to check. |
userName | Location of the result for the description of the logger. |
MAMAExpDLL mama_status mamaStatsLogger_setHostName | ( | mamaStatsLogger | logger, |
const char * | hostName | ||
) |
Set the hostName.
logger | The logger object to update. |
hostName | The host name for the logger |
MAMAExpDLL mama_status mamaStatsLogger_getHostName | ( | const mamaStatsLogger | logger, |
const char ** | hostName | ||
) |
Get the hostName.
logger | The logger object to check. |
hostName | Location of the result for the description of the logger. |
MAMAExpDLL mama_status mamaStatsLogger_setApplicationName | ( | mamaStatsLogger | logger, |
const char * | appName | ||
) |
Set the applicationName.
logger | The logger object to update. |
appName | The applicationName for the logger |
MAMAExpDLL mama_status mamaStatsLogger_getApplicationName | ( | const mamaStatsLogger | logger, |
const char ** | appName | ||
) |
Get the applicationName.
logger | The logger object to check. |
appName | Location of the result for the applicationName |
MAMAExpDLL mama_status mamaStatsLogger_setApplicationClass | ( | mamaStatsLogger | logger, |
const char * | applClass | ||
) |
Set the applicationClass.
logger | The logger object to update. |
applClass | The applicationName for the logger |
MAMAExpDLL mama_status mamaStatsLogger_getApplicationClass | ( | const mamaStatsLogger | logger, |
const char ** | appClass | ||
) |
Get the applicationClass.
logger | The logger object to check. |
appClass | Location of the result for the applicationClass |
MAMAExpDLL mama_status mamaStatsLogger_setIpAddress | ( | mamaStatsLogger | logger, |
const char * | ipAddress | ||
) |
Set the ipAddress.
logger | The logger object to update. |
ipAddress | The ipAddress for the logger |
MAMAExpDLL mama_status mamaStatsLogger_getIpAddress | ( | const mamaStatsLogger | logger, |
const char ** | ipAddress | ||
) |
Get the ipAddress.
logger | The logger object to check. |
ipAddress | Location of the result for the ipAddress of the logger. |
MAMAExpDLL mama_status mamaStatsLogger_logLogin | ( | mamaStatsLogger | logger | ) |
Log a login event.
logger | The logger object to use. |
MAMAExpDLL mama_status mamaStatsLogger_logLogout | ( | mamaStatsLogger | logger | ) |
Log a logout event.
logger | The logger object to use. |
MAMAExpDLL mama_status mamaStatsLogger_logSubscriptionEntitlePass | ( | mamaStatsLogger | logger, |
mamaSubscription | subscription, | ||
int32_t | entitleCode | ||
) |
Log a subscription entitlement check pass event.
logger | The logger object to use. |
subscription | the subscription |
entitleCode | the entitlement code |
MAMAExpDLL mama_status mamaStatsLogger_logSubscriptionFail | ( | mamaStatsLogger | logger, |
mamaSubscription | subscription, | ||
mamaSlSubFailReason | reason | ||
) |
Log a subscription fail event.
logger | The logger object to use. |
subscription | the subscription |
reason | the reason |
MAMAExpDLL mama_status mamaStatsLogger_logSubscriptionDestroy | ( | mamaStatsLogger | logger, |
mamaSubscription | subscription | ||
) |
Log a subscription destroy event.
logger | The logger object to use. |
subscription | the subscription |
MAMAExpDLL mama_status mamaStatsLogger_addStatMsg | ( | mamaStatsLogger * | logger, |
mamaMsg | msg | ||
) |
MAMAExpDLL mama_status mamaStatsLogger_sendReport | ( | mamaStatsLogger * | logger | ) |
MAMAExpDLL mama_status mamaStatsLogger_getLogMsgStats | ( | mamaStatsLogger | logger, |
mama_bool_t * | logMsgStats | ||
) |
MAMAExpDLL mama_status mamaStatsLogger_setLogMsgStats | ( | mamaStatsLogger | logger, |
mama_bool_t | logMsgStats | ||
) |
MAMAExpDLL mama_status mamaStatsLogger_incMsgCount | ( | mamaStatsLogger | statsLogger | ) |