OpenClovis Logo

Classes | Macros | Typedefs | Enumerations | Functions
clLogApi.h File Reference

Header file of Log Service related APIs. More...

#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <clTimerApi.h>
#include <clCommon.h>
#include <clDbg.h>
#include <clLogUtilApi.h>
#include <ipi/clLogIpiWrap.h>

Go to the source code of this file.

Classes

struct  ClLogCallbacksT
 This structure describes about the callbacks which can be provided by process while initializing with Log Service. More...
struct  ClLogFilterT
 This structure describes the filter settings for the stream. More...
struct  ClLogStreamAttributesT
 This structure describes the attributes of the stream. More...
struct  ClLogStreamInfoT
 This structure describes all the information about the log stream. More...
struct  ClLogStreamMapT
 This structure describes the information about the log stream to stream Id mapping. More...

Macros

#define CL_LOG_FILTER_ASSIGN   0x1
 Discard the old filter settings and use new settings provided.
#define CL_LOG_FILTER_MERGE_ADD   0x2
 Add to the old filter settings as per new filter settings provided.
#define CL_LOG_FILTER_MERGE_DELETE   0x3
 Delete to the old filter settings as per new filter settings provided.
#define CL_LOG_HANDLER_WILL_ACK   0x1
 This flags informs the log service that the stream handlers will acknowledge for all the records, it has received.
#define CL_LOG_MSGID_BUFFER   0
 Logging messgae in binary format.
#define CL_LOG_MSGID_PRINTF_FMT   1
 Logging message in ASCII format.
#define CL_LOG_SLINE_MSG_LEN   256
 Maximum Single line message length.
#define CL_LOG_STREAM_CREATE   0x1
 This flag specifies the log service that the particular stream should be created, if it does not exist already in the cluster.
#define CL_LOG_STREAM_NAME_MAX_LENGTH   128
 Maximum length of stream Name.
#define CL_LOG_TAG_BASIC_SIGNED   0x1
 The following macros will be used while doing TLV log write.
#define CL_LOG_TAG_BASIC_UNSIGNED   0x2
 its basic unsigned data type.
#define CL_LOG_TAG_STRING   0x3
 its basic string type.
#define CL_LOG_TAG_TERMINATE   0
 This tag is used for terminating the TLV type.
#define CL_LOG_TLV_INT16(var)   CL_LOG_TAG_BASIC_SIGNED, sizeof( var ), &(var)
 TLV for signed 16 bit varible(ClInt16T).
#define CL_LOG_TLV_INT32(var)   CL_LOG_TAG_BASIC_SIGNED, sizeof( var ), &(var)
 TLV for signed 32 bit varible(ClInt32T).
#define CL_LOG_TLV_INT64(var)   CL_LOG_TAG_BASIC_SIGNED, sizeof( var ), &(var)
 TLV for signed 64 bit varible(ClInt64T)
#define CL_LOG_TLV_INT8(var)   CL_LOG_TAG_BASIC_SIGNED, sizeof( var ), &(var)
 TLV for signed byte variable(ClInt8T).
#define CL_LOG_TLV_STRING(var)   CL_LOG_TAG_STRING, (strlen( var ) + 1), (var)
 TLV for any string.
#define CL_LOG_TLV_UINT16(var)   CL_LOG_TAG_BASIC_UNSIGNED, sizeof( var ), &(var)
 TLV for unsigned 16 bit variable(ClUint16T).
#define CL_LOG_TLV_UINT32(var)   CL_LOG_TAG_BASIC_UNSIGNED, sizeof( var ), &(var)
 TLV for unsigned 32 bit varible(ClUint32T).
#define CL_LOG_TLV_UINT64(var)   CL_LOG_TAG_BASIC_UNSIGNED, sizeof( var ), &(var)
 TLV for unsigned 64 bit varible(ClUint64T).
#define CL_LOG_TLV_UINT8(var)   CL_LOG_TAG_BASIC_UNSIGNED, sizeof( var ), &(var)
 TLV for unsigned byte variable(ClUint8T).
#define clLogWrite(streamHdl, severity, libName,...)
 Logging for applications.

Typedefs

typedef ClHandleT ClLogFileHandleT
 The type of handle supplied by Log Service to a process who has opened a file for consuming log records.
typedef ClUint8T ClLogFilterFlagsT
 It takes the values of above specifed flags.
typedef void(* ClLogFilterSetCallbackT )(CL_IN ClLogStreamHandleT hStream, CL_IN ClLogFilterT filter)
 Informs the logger about a change in filter settings of a Log stream opened by this logger.
typedef ClHandleT ClLogHandleT
 The type of handle supplied by Log Service during initialization.
typedef void(* ClLogRecordDeliveryCallbackT )(CL_IN ClLogStreamHandleT hStream, CL_IN ClUint64T seqNum, CL_IN ClUint32T numRecords, CL_IN ClPtrT pRecords)
 Callback function to receive log records of Log streams of interest.
typedef ClUint16T ClLogSeverityFilterT
 Variables of this type is used as a bitmap.
typedef ClUint8T ClLogStreamHandlerFlagsT
 While registering as strean handler, the process should specify this flag.
typedef ClHandleT ClLogStreamHandleT
 The type of handle supplied by Log Service during log streamOpen and a process register itself as stream handler for the stream.
typedef void(* ClLogStreamOpenCallbackT )(CL_IN ClInvocationT invocation, CL_IN ClLogStreamHandleT hStream, CL_IN ClRcT rc)
 This function gets called When clLogStreamOpenAsync() call returns on the server.
typedef ClUint8T ClLogStreamOpenFlagsT
 This flags to specify the stream should be created or opened.

Enumerations

enum  ClLogFileFullActionT {
  CL_LOG_FILE_FULL_ACTION_ROTATE = 0,
  CL_LOG_FILE_FULL_ACTION_WRAP = 1,
  CL_LOG_FILE_FULL_ACTION_HALT = 2
}
 This enumeration is used to specify the behavior of Log Service once the Log File into which this Log Stream is going becomes full. More...
enum  ClLogSeverityT {
  CL_LOG_SEV_EMERGENCY = 0x1,
  CL_LOG_SEV_ALERT,
  CL_LOG_SEV_CRITICAL,
  CL_LOG_SEV_ERROR,
  CL_LOG_SEV_WARNING,
  CL_LOG_SEV_NOTICE,
  CL_LOG_SEV_INFO,
  CL_LOG_SEV_DEBUG ,
  CL_LOG_SEV_TRACE = CL_LOG_SEV_DEBUG5 ,
  CL_LOG_SEV_MAX = CL_LOG_SEV_DEBUG9
}
enum  ClLogStreamScopeT {
  CL_LOG_STREAM_GLOBAL = 0,
  CL_LOG_STREAM_LOCAL = 1
}
 This enumeration is used to specify the scope of the stream. More...

Functions

ClRcT clLogFileClose (CL_IN ClLogFileHandleT hFileHdlr)
 Close the file which was opened for reading.
ClRcT clLogFileMetaDataGet (CL_IN ClLogFileHandleT hFileHdlr, CL_OUT ClLogStreamAttributesT *pStreamAttr, CL_OUT ClUint32T *pNumStreams, CL_OUT ClLogStreamMapT **ppLogStreams)
 Gets the metadata of the file.
ClRcT clLogFileOpen (CL_IN ClLogHandleT hLog, CL_IN ClCharT *fileName, CL_IN ClCharT *fileLocation, CL_IN ClBoolT isDelete, CL_IN ClLogFileHandleT *phFile)
 Opens the current logical log file for reading the log records.
ClRcT clLogFileRecordsGet (CL_IN ClLogFileHandleT hFileHdlr, CL_OUT ClTimeT *pStarTime, CL_OUT ClTimeT *pEndTime, CL_OUT ClUint32T *pNumRecords, CL_OUT ClPtrT *pLogRecords)
 Gets the records from the file.
ClRcT clLogFilterSet (CL_IN ClLogStreamHandleT hStream, CL_IN ClLogFilterFlagsT filterFlags, CL_IN ClLogFilterT filter)
 Changes the filter settings of a Log Stream.
ClRcT clLogFinalize (CL_IN ClLogHandleT hLog)
 Finalize the Log service for the calling process and ensures to release all the resources.
ClRcT clLogHandlerDeregister (CL_IN ClLogStreamHandleT hStream)
 Deregisters the calling process as handler for the specified stream.
ClRcT clLogHandlerRecordAck (CL_IN ClLogStreamHandleT hStream, CL_IN ClUint64T sequenceNumber, CL_IN ClUint32T numRecords)
 Function to acknowledge, receipt of Log Records, to the sender of the Log Records.
ClRcT clLogHandlerRegister (CL_IN ClLogHandleT hLog, CL_IN ClNameT streamName, CL_IN ClLogStreamScopeT streamScope, CL_IN ClNameT nodeName, CL_IN ClLogStreamHandlerFlagsT handlerFlags, CL_OUT ClLogHandleT *phStream)
 Registers the calling process as handler for the specified stream.
ClRcT clLogInitialize (CL_OUT ClLogHandleT *phLog, CL_IN const ClLogCallbacksT *pLogCallbacks, CL_INOUT ClVersionT *pVersion)
 Initializes the Log service for the calling process and ensures the version compatability.
ClRcT clLogStreamClose (CL_IN ClLogStreamHandleT hStream)
 Close the stream opened for logging.
ClRcT clLogStreamListGet (CL_IN ClLogHandleT hLog, CL_OUT ClUint32T *pNumStreams, CL_OUT ClLogStreamInfoT **ppLogStreams)
 Gets the list of active streams available in the cluster.
ClRcT clLogStreamOpen (CL_IN ClLogHandleT hLog, CL_IN ClNameT streamName, CL_IN ClLogStreamScopeT streamScope, CL_IN ClLogStreamAttributesT *pStreamAttr, CL_IN ClLogStreamOpenFlagsT streamOpenFlags, CL_IN ClTimeT timeout, CL_OUT ClLogStreamHandleT *phStream)
 Opens the stream for Logging.
ClRcT clLogWriteAsync (ClLogStreamHandleT hStream, ClLogSeverityT severity, ClUint16T serviceId, ClUint16T msgId,...)
 Logs a Log Record in the specified Log Stream.

Detailed Description

Header file of Log Service related APIs.


Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen