Main Page | Modules | Namespace List | Class List | File List | Class Members | File Members

SBlog.cpp File Reference

#include "SBlogInternal.h"
#include <cstring>
#include <ctime>
#include <vector>
#include "SBlog.h"
#include "SBlogOSUtils.h"

Defines

#define SBLOG_EXPORTS
#define SBLOG_ERR_OUT_OF_MEMORY   100, L"SBlog: Out of memory", NULL
#define SBLOG_ERR_ALREADY_INITIALIZED   104, L"SBlog: Already initialized", NULL
#define SBLOG_ERR_NOT_INITIALIZED   105, L"SBlog: Not initialized", NULL
#define MODULE_PREFIX   COMPANY_DOMAIN L"."
#define MODULE_NAME   MODULE_PREFIX L"SBlog"

Functions

VXIlogResult SBlogControlDiagnosticTag (SBlogInterface *pThis, VXIunsigned tagID, VXIbool state)
VXIlogResult SBlogRegisterErrorListener (SBlogInterface *pThis, SBlogErrorListener *alistener, void *userdata)
VXIlogResult SBlogUnregisterErrorListener (SBlogInterface *pThis, SBlogErrorListener *alistener, void *userdata)
VXIlogResult SBlogRegisterDiagnosticListener (SBlogInterface *pThis, SBlogDiagnosticListener *alistener, void *userdata)
VXIlogResult SBlogUnregisterDiagnosticListener (SBlogInterface *pThis, SBlogDiagnosticListener *alistener, void *userdata)
VXIlogResult SBlogRegisterEventListener (SBlogInterface *pThis, SBlogEventListener *alistener, void *userdata)
VXIlogResult SBlogUnregisterEventListener (SBlogInterface *pThis, SBlogEventListener *alistener, void *userdata)
VXIlogResult SBlogRegisterContentListener (SBlogInterface *pThis, SBlogContentListener *alistener, void *userdata)
VXIlogResult SBlogUnregisterContentListener (SBlogInterface *pThis, SBlogContentListener *alistener, void *userdata)
SBLOG_API VXIint32 SBlogGetVersion (void)
SBLOG_API const VXIcharSBlogGetImplementationName (void)
SBLOG_API VXIbool SBlogDiagnosticIsEnabled (VXIlogInterface *pThis, VXIunsigned tagID)
SBLOG_API VXIlogResult SBlogDiagnostic (VXIlogInterface *pThis, VXIunsigned tagID, const VXIchar *subtag, const VXIchar *format,...)
SBLOG_API VXIlogResult SBlogVDiagnostic (VXIlogInterface *pThis, VXIunsigned tagID, const VXIchar *subtag, const VXIchar *format, va_list vargs)
SBLOG_API VXIlogResult SBlogEvent (VXIlogInterface *pThis, VXIunsigned eventID, const VXIchar *format,...)
SBLOG_API VXIlogResult SBlogVEvent (VXIlogInterface *pThis, VXIunsigned eventID, const VXIchar *format, va_list vargs)
SBLOG_API VXIlogResult SBlogEventVector (VXIlogInterface *pThis, VXIunsigned eventID, const VXIVector *keys, const VXIVector *values)
SBLOG_API VXIlogResult SBlogError (VXIlogInterface *pThis, const VXIchar *moduleName, VXIunsigned errorID, const VXIchar *format,...)
SBLOG_API VXIlogResult SBlogVError (VXIlogInterface *pThis, const VXIchar *moduleName, VXIunsigned errorID, const VXIchar *format, va_list vargs)
SBLOG_API VXIlogResult SBlogContentOpen (VXIlogInterface *pThis, const VXIchar *moduleName, const VXIchar *contentType, VXIString **logKey, VXIString **logValue, VXIlogStream **stream)
SBLOG_API VXIlogResult SBlogContentClose (VXIlogInterface *pThis, VXIlogStream **stream)
SBLOG_API VXIlogResult SBlogContentWrite (VXIlogInterface *pThis, const VXIbyte *buffer, VXIulong buflen, VXIulong *nwritten, VXIlogStream *stream)
SBLOG_API VXIlogResult SBlogInit (void)
 Global platform initialization of SBlog.
SBLOG_API VXIlogResult SBlogShutDown (void)
 Global platform shutdown of Log.
SBLOG_API VXIlogResult SBlogCreateResource (VXIlogInterface **log)
 Create a new log service handle.
SBLOG_API VXIlogResult SBlogDestroyResource (VXIlogInterface **log)
 Destroy the interface and free internal resources.

Variables

static const VXIunsigned MAX_LOG_BUFFER = 4096 * 2
static const VXIunsigned TAG_ARRAY_SIZE = (((SBLOG_MAX_TAG) + 1) / 8 + 1)
static bool gblInitialized = false


Define Documentation

#define MODULE_NAME   MODULE_PREFIX L"SBlog"
 

#define MODULE_PREFIX   COMPANY_DOMAIN L"."
 

#define SBLOG_ERR_ALREADY_INITIALIZED   104, L"SBlog: Already initialized", NULL
 

#define SBLOG_ERR_NOT_INITIALIZED   105, L"SBlog: Not initialized", NULL
 

#define SBLOG_ERR_OUT_OF_MEMORY   100, L"SBlog: Out of memory", NULL
 

#define SBLOG_EXPORTS
 


Function Documentation

SBLOG_API VXIlogResult SBlogContentClose VXIlogInterface pThis,
VXIlogStream **  stream
 

SBLOG_API VXIlogResult SBlogContentOpen VXIlogInterface pThis,
const VXIchar moduleName,
const VXIchar contentType,
VXIString **  logKey,
VXIString **  logValue,
VXIlogStream **  stream
 

SBLOG_API VXIlogResult SBlogContentWrite VXIlogInterface pThis,
const VXIbyte buffer,
VXIulong  buflen,
VXIulong nwritten,
VXIlogStream stream
 

VXIlogResult SBlogControlDiagnosticTag SBlogInterface pThis,
VXIunsigned  tagID,
VXIbool  state
 

SBLOG_API VXIlogResult SBlogCreateResource VXIlogInterface **  log  ) 
 

Create a new log service handle.

Returns:
VXIlogResult 0 on success

SBLOG_API VXIlogResult SBlogDestroyResource VXIlogInterface **  log  ) 
 

Destroy the interface and free internal resources.

Returns:
VXIlogResult 0 on success

SBLOG_API VXIlogResult SBlogDiagnostic VXIlogInterface pThis,
VXIunsigned  tagID,
const VXIchar subtag,
const VXIchar format,
  ...
 

SBLOG_API VXIbool SBlogDiagnosticIsEnabled VXIlogInterface pThis,
VXIunsigned  tagID
 

SBLOG_API VXIlogResult SBlogError VXIlogInterface pThis,
const VXIchar moduleName,
VXIunsigned  errorID,
const VXIchar format,
  ...
 

SBLOG_API VXIlogResult SBlogEvent VXIlogInterface pThis,
VXIunsigned  eventID,
const VXIchar format,
  ...
 

SBLOG_API VXIlogResult SBlogEventVector VXIlogInterface pThis,
VXIunsigned  eventID,
const VXIVector *  keys,
const VXIVector *  values
 

SBLOG_API const VXIchar* SBlogGetImplementationName void   ) 
 

SBLOG_API VXIint32 SBlogGetVersion void   ) 
 

SBLOG_API VXIlogResult SBlogInit void   ) 
 

Global platform initialization of SBlog.

Returns:
VXIlogResult 0 on success

VXIlogResult SBlogRegisterContentListener SBlogInterface pThis,
SBlogContentListener alistener,
void *  userdata
 

VXIlogResult SBlogRegisterDiagnosticListener SBlogInterface pThis,
SBlogDiagnosticListener alistener,
void *  userdata
 

VXIlogResult SBlogRegisterErrorListener SBlogInterface pThis,
SBlogErrorListener alistener,
void *  userdata
 

VXIlogResult SBlogRegisterEventListener SBlogInterface pThis,
SBlogEventListener alistener,
void *  userdata
 

SBLOG_API VXIlogResult SBlogShutDown void   ) 
 

Global platform shutdown of Log.

Returns:
VXIlogResult 0 on success

VXIlogResult SBlogUnregisterContentListener SBlogInterface pThis,
SBlogContentListener alistener,
void *  userdata
 

VXIlogResult SBlogUnregisterDiagnosticListener SBlogInterface pThis,
SBlogDiagnosticListener alistener,
void *  userdata
 

VXIlogResult SBlogUnregisterErrorListener SBlogInterface pThis,
SBlogErrorListener alistener,
void *  userdata
 

VXIlogResult SBlogUnregisterEventListener SBlogInterface pThis,
SBlogEventListener alistener,
void *  userdata
 

SBLOG_API VXIlogResult SBlogVDiagnostic VXIlogInterface pThis,
VXIunsigned  tagID,
const VXIchar subtag,
const VXIchar format,
va_list  vargs
 

SBLOG_API VXIlogResult SBlogVError VXIlogInterface pThis,
const VXIchar moduleName,
VXIunsigned  errorID,
const VXIchar format,
va_list  vargs
 

SBLOG_API VXIlogResult SBlogVEvent VXIlogInterface pThis,
VXIunsigned  eventID,
const VXIchar format,
va_list  vargs
 


Variable Documentation

bool gblInitialized = false [static]
 

const VXIunsigned MAX_LOG_BUFFER = 4096 * 2 [static]
 

const VXIunsigned TAG_ARRAY_SIZE = (((SBLOG_MAX_TAG) + 1) / 8 + 1) [static]
 


Generated on Mon Apr 25 13:02:13 2005 for OpenVXI by  doxygen 1.4.2