Name | |
---|---|
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} |
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} |
typedef enum mamaSlEvent_ | mamaSlEvent |
typedef enum mamaSlSubFailReason_ | mamaSlSubFailReason |
Name | |
---|---|
MAMAExpDLL const char * | mamaStatsLogger_eventToString(mamaSlEvent event) |
MAMAExpDLL const char * | mamaStatsLogger_subFailReasonToString(mamaSlSubFailReason subFailReason) |
MAMAExpDLL mama_status | mamaStatsLogger_allocate(mamaStatsLogger * logger) |
MAMAExpDLL mama_status | mamaStatsLogger_create(mamaStatsLogger logger, mamaQueue queue, mamaTransport tport) |
MAMAExpDLL mama_status | mamaStatsLogger_createForStats(mamaStatsLogger logger, mamaQueue queue, mamaTransport tport, const char * topic) |
MAMAExpDLL mama_status | mamaStatsLogger_destroy(mamaStatsLogger logger) |
MAMAExpDLL mama_status | mamaStatsLogger_setReportInterval(mamaStatsLogger logger, mama_f64_t interval) |
MAMAExpDLL mama_status | mamaStatsLogger_setReportSize(mamaStatsLogger logger, mama_size_t numEvents) |
MAMAExpDLL mama_status | mamaStatsLogger_setUserName(mamaStatsLogger logger, const char * userName) |
MAMAExpDLL mama_status | mamaStatsLogger_getUserName(const mamaStatsLogger logger, const char ** userName) |
MAMAExpDLL mama_status | mamaStatsLogger_setHostName(mamaStatsLogger logger, const char * hostName) |
MAMAExpDLL mama_status | mamaStatsLogger_getHostName(const mamaStatsLogger logger, const char ** hostName) |
MAMAExpDLL mama_status | mamaStatsLogger_setApplicationName(mamaStatsLogger logger, const char * appName) |
MAMAExpDLL mama_status | mamaStatsLogger_getApplicationName(const mamaStatsLogger logger, const char ** appName) |
MAMAExpDLL mama_status | mamaStatsLogger_setApplicationClass(mamaStatsLogger logger, const char * applClass) |
MAMAExpDLL mama_status | mamaStatsLogger_getApplicationClass(const mamaStatsLogger logger, const char ** appClass) |
MAMAExpDLL mama_status | mamaStatsLogger_setIpAddress(mamaStatsLogger logger, const char * ipAddress) |
MAMAExpDLL mama_status | mamaStatsLogger_getIpAddress(const mamaStatsLogger logger, const char ** ipAddress) |
MAMAExpDLL mama_status | mamaStatsLogger_logLogin(mamaStatsLogger logger) |
MAMAExpDLL mama_status | mamaStatsLogger_logLogout(mamaStatsLogger logger) |
MAMAExpDLL mama_status | mamaStatsLogger_logSubscriptionEntitlePass(mamaStatsLogger logger, mamaSubscription subscription, int32_t entitleCode) |
MAMAExpDLL mama_status | mamaStatsLogger_logSubscriptionFail(mamaStatsLogger logger, mamaSubscription subscription, mamaSlSubFailReason reason) |
MAMAExpDLL mama_status | mamaStatsLogger_logSubscriptionDestroy(mamaStatsLogger logger, mamaSubscription 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) |
Name | |
---|---|
SL_TOPIC_USAGE_LOG | |
STATS_TOPIC |
Enumerator | Value | Description |
---|---|---|
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
Enumerator | Value | Description |
---|---|---|
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
typedef enum mamaSlEvent_ mamaSlEvent;
The event types handled by the stats logger
typedef enum mamaSlSubFailReason_ mamaSlSubFailReason;
The reasons for a subscription to fail
MAMAExpDLL const char * mamaStatsLogger_eventToString(
mamaSlEvent event
)
Parameters:
Convert a mamaSlEvent value to a string. Do no attempt to free the string result.
MAMAExpDLL const char * mamaStatsLogger_subFailReasonToString(
mamaSlSubFailReason subFailReason
)
Parameters:
Convert a mamaSlSubFailReason value to a string. Do no attempt to free the string result.
MAMAExpDLL mama_status mamaStatsLogger_allocate(
mamaStatsLogger * logger
)
Parameters:
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.
MAMAExpDLL mama_status mamaStatsLogger_create(
mamaStatsLogger logger,
mamaQueue queue,
mamaTransport tport
)
Parameters:
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
)
Parameters:
Destroy a mamaStatsLogger object, freeing any memory
MAMAExpDLL mama_status mamaStatsLogger_setReportInterval(
mamaStatsLogger logger,
mama_f64_t interval
)
Parameters:
Set the reporting interval
MAMAExpDLL mama_status mamaStatsLogger_setReportSize(
mamaStatsLogger logger,
mama_size_t numEvents
)
Parameters:
Set the maximum number of events to cache before reporting
MAMAExpDLL mama_status mamaStatsLogger_setUserName(
mamaStatsLogger logger,
const char * userName
)
Parameters:
Set the userName
MAMAExpDLL mama_status mamaStatsLogger_getUserName(
const mamaStatsLogger logger,
const char ** userName
)
Parameters:
Get the userName
MAMAExpDLL mama_status mamaStatsLogger_setHostName(
mamaStatsLogger logger,
const char * hostName
)
Parameters:
Set the hostName
MAMAExpDLL mama_status mamaStatsLogger_getHostName(
const mamaStatsLogger logger,
const char ** hostName
)
Parameters:
Get the hostName
MAMAExpDLL mama_status mamaStatsLogger_setApplicationName(
mamaStatsLogger logger,
const char * appName
)
Parameters:
Set the applicationName
MAMAExpDLL mama_status mamaStatsLogger_getApplicationName(
const mamaStatsLogger logger,
const char ** appName
)
Parameters:
Get the applicationName
MAMAExpDLL mama_status mamaStatsLogger_setApplicationClass(
mamaStatsLogger logger,
const char * applClass
)
Parameters:
Set the applicationClass
MAMAExpDLL mama_status mamaStatsLogger_getApplicationClass(
const mamaStatsLogger logger,
const char ** appClass
)
Parameters:
Get the applicationClass
MAMAExpDLL mama_status mamaStatsLogger_setIpAddress(
mamaStatsLogger logger,
const char * ipAddress
)
Parameters:
Set the ipAddress
MAMAExpDLL mama_status mamaStatsLogger_getIpAddress(
const mamaStatsLogger logger,
const char ** ipAddress
)
Parameters:
Get the ipAddress
MAMAExpDLL mama_status mamaStatsLogger_logLogin(
mamaStatsLogger logger
)
Parameters:
Log a login event
MAMAExpDLL mama_status mamaStatsLogger_logLogout(
mamaStatsLogger logger
)
Parameters:
Log a logout event
MAMAExpDLL mama_status mamaStatsLogger_logSubscriptionEntitlePass(
mamaStatsLogger logger,
mamaSubscription subscription,
int32_t entitleCode
)
Parameters:
Log a subscription entitlement check pass event
MAMAExpDLL mama_status mamaStatsLogger_logSubscriptionFail(
mamaStatsLogger logger,
mamaSubscription subscription,
mamaSlSubFailReason reason
)
Parameters:
Log a subscription fail event
MAMAExpDLL mama_status mamaStatsLogger_logSubscriptionDestroy(
mamaStatsLogger logger,
mamaSubscription subscription
)
Parameters:
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"
/* $Id$
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Technologies, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef MamaStatsLoggerH__
#define MamaStatsLoggerH__
#include <mama/status.h>
#include <mama/types.h>
#if defined(__cplusplus)
extern "C" {
#endif
/************************************************************************
* Constants
*************************************************************************/
#define SL_TOPIC_USAGE_LOG "SL_TOPIC_USAGE_LOG"
#define STATS_TOPIC "STATS_TOPIC"
/************************************************************************
* Typedefs
*************************************************************************/
typedef 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
} mamaSlEvent;
typedef 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
} mamaSlSubFailReason;
/************************************************************************
* Functions
*************************************************************************/
MAMAExpDLL
extern const char*
mamaStatsLogger_eventToString (mamaSlEvent event);
MAMAExpDLL
extern const char*
mamaStatsLogger_subFailReasonToString (mamaSlSubFailReason subFailReason);
MAMAExpDLL
extern mama_status
mamaStatsLogger_allocate (mamaStatsLogger* logger);
MAMAExpDLL
extern mama_status
mamaStatsLogger_create (mamaStatsLogger logger,
mamaQueue queue,
mamaTransport tport);
MAMAExpDLL
extern mama_status
mamaStatsLogger_createForStats (mamaStatsLogger logger,
mamaQueue queue,
mamaTransport tport,
const char* topic);
MAMAExpDLL
extern mama_status
mamaStatsLogger_destroy (mamaStatsLogger logger);
MAMAExpDLL
extern mama_status
mamaStatsLogger_setReportInterval (mamaStatsLogger logger,
mama_f64_t interval);
MAMAExpDLL
extern mama_status
mamaStatsLogger_setReportSize(mamaStatsLogger logger,
mama_size_t numEvents);
MAMAExpDLL
extern mama_status
mamaStatsLogger_setUserName (mamaStatsLogger logger,
const char* userName);
MAMAExpDLL
extern mama_status
mamaStatsLogger_getUserName (const mamaStatsLogger logger,
const char** userName);
MAMAExpDLL
extern mama_status
mamaStatsLogger_setHostName (mamaStatsLogger logger,
const char* hostName);
MAMAExpDLL
extern mama_status
mamaStatsLogger_getHostName (const mamaStatsLogger logger,
const char** hostName);
MAMAExpDLL
extern mama_status
mamaStatsLogger_setApplicationName (mamaStatsLogger logger,
const char* appName);
MAMAExpDLL
extern mama_status
mamaStatsLogger_getApplicationName (const mamaStatsLogger logger,
const char** appName);
MAMAExpDLL
extern mama_status
mamaStatsLogger_setApplicationClass (mamaStatsLogger logger,
const char* applClass);
MAMAExpDLL
extern mama_status
mamaStatsLogger_getApplicationClass (const mamaStatsLogger logger,
const char** appClass);
MAMAExpDLL
extern mama_status
mamaStatsLogger_setIpAddress (mamaStatsLogger logger,
const char* ipAddress);
MAMAExpDLL
extern mama_status
mamaStatsLogger_getIpAddress (const mamaStatsLogger logger,
const char** ipAddress);
MAMAExpDLL
extern mama_status
mamaStatsLogger_logLogin (mamaStatsLogger logger);
MAMAExpDLL
extern mama_status
mamaStatsLogger_logLogout (mamaStatsLogger logger);
MAMAExpDLL
extern mama_status
mamaStatsLogger_logSubscriptionEntitlePass (mamaStatsLogger logger,
mamaSubscription subscription,
int32_t entitleCode);
MAMAExpDLL
extern mama_status
mamaStatsLogger_logSubscriptionFail (mamaStatsLogger logger,
mamaSubscription subscription,
mamaSlSubFailReason reason);
MAMAExpDLL
extern mama_status
mamaStatsLogger_logSubscriptionDestroy (mamaStatsLogger logger,
mamaSubscription subscription);
MAMAExpDLL
extern mama_status
mamaStatsLogger_addStatMsg (mamaStatsLogger* logger,
mamaMsg msg);
MAMAExpDLL
extern mama_status
mamaStatsLogger_sendReport (mamaStatsLogger* logger);
MAMAExpDLL
extern mama_status
mamaStatsLogger_getLogMsgStats (mamaStatsLogger logger,
mama_bool_t* logMsgStats);
MAMAExpDLL
extern mama_status
mamaStatsLogger_setLogMsgStats (mamaStatsLogger logger,
mama_bool_t logMsgStats);
MAMAExpDLL
extern mama_status
mamaStatsLogger_incMsgCount (mamaStatsLogger statsLogger);
#if defined(__cplusplus)
}
#endif
#endif
Updated on 2023-03-31 at 15:29:16 +0100