Classes | Defines | Typedefs | Enumerations | Functions | Variables
XnLog.h File Reference
#include "XnOS.h"
Include dependency graph for XnLog.h:

Go to the source code of this file.

Classes

struct  XnDump

Defines

#define XN_LOG_DIR_NAME   "Log"
#define XN_LOG_MASK_ALL   "ALL"
#define XN_LOG_MASKS_STRING_LEN   600
#define XN_MASK_LOG   "Log"

Typedefs

typedef struct XnDump XnDump
typedef enum XnLogSeverity XnLogSeverity

Enumerations

enum  XnLogFilteringType { XN_LOG_WRITE_NONE, XN_LOG_WRITE_ALL, XN_LOG_WRITE_MASKS }
enum  XnLogSeverity { XN_LOG_VERBOSE, XN_LOG_INFO, XN_LOG_WARNING, XN_LOG_ERROR }

Functions

XN_C_API void xnDumpClose (XnDump *pDump)
XN_C_API void xnDumpFlush (XnDump dump)
XN_C_API void xnDumpForceInit (XnDump *pDump, const XnChar *csHeader, const XnChar *csFileNameFormat,...)
XN_C_API void xnDumpInit (XnDump *pDump, const XnChar *csDumpMask, const XnChar *csHeader, const XnChar *csFileNameFormat,...)
XN_C_API XnStatus xnDumpSetMaskState (const XnChar *csMask, XnBool bEnabled)
void xnDumpWriteBuffer (XnDump dump, const void *pBuffer, XnUInt32 nBufferSize)
XN_C_API void xnDumpWriteBufferImpl (XnDump dump, const void *pBuffer, XnUInt32 nBufferSize)
XN_C_API void xnDumpWriteStringImpl (XnDump dump, const XnChar *csFormat,...)
XN_C_API XnStatus xnLogClose ()
XN_C_API XnStatus xnLogInitFromINIFile (const XnChar *csINIFile, const XnChar *csSectionName)
XN_C_API XnStatus xnLogInitFromXmlFile (const XnChar *strFileName)
XN_C_API XnStatus xnLogInitSystem ()
XN_C_API XnBool xnLogIsDumpMaskEnabled (const XnChar *csDumpMask)
XN_C_API XnBool xnLogIsEnabled (const XnChar *csLogMask, XnLogSeverity nSeverity)
XN_C_API XnStatus xnLogSetConsoleOutput (XnBool bConsoleOutput)
XN_C_API XnStatus xnLogSetFileOutput (XnBool bFileOutput)
XN_C_API XnStatus xnLogSetLineInfo (XnBool bLineInfo)
XN_C_API XnStatus xnLogSetMaskState (const XnChar *csMask, XnBool bEnabled)
XN_C_API XnStatus xnLogSetOutputFolder (const XnChar *strOutputFolder)
XN_C_API XnStatus xnLogSetSeverityFilter (XnLogSeverity nMinSeverity)
XN_C_API XnStatus xnLogStartNewFile ()
XN_C_API void xnLogWrite (const XnChar *csLogMask, XnLogSeverity nSeverity, const XnChar *csFile, XnUInt32 nLine, const XnChar *csFormat,...)
XN_C_API void xnLogWriteBinaryData (const XnChar *csLogMask, XnLogSeverity nSeverity, const XnChar *csFile, XnUInt32 nLine, XnUChar *pBinData, XnUInt32 nDataSize, const XnChar *csFormat,...)
XN_C_API void xnLogWriteNoEntry (const XnChar *csLogMask, XnLogSeverity nSeverity, const XnChar *csFormat,...)

Variables

const XnDump XN_DUMP_CLOSED = { XN_INVALID_FILE_HANDLE }

Define Documentation

#define XN_LOG_DIR_NAME   "Log"

Definition at line 37 of file XnLog.h.

#define XN_LOG_MASK_ALL   "ALL"

Definition at line 40 of file XnLog.h.

#define XN_LOG_MASKS_STRING_LEN   600

Definition at line 38 of file XnLog.h.

#define XN_MASK_LOG   "Log"

Definition at line 39 of file XnLog.h.


Typedef Documentation

typedef struct XnDump XnDump

Enumeration Type Documentation

Enumerator:
XN_LOG_WRITE_NONE 
XN_LOG_WRITE_ALL 
XN_LOG_WRITE_MASKS 

Definition at line 53 of file XnLog.h.

Enumerator:
XN_LOG_VERBOSE 
XN_LOG_INFO 
XN_LOG_WARNING 
XN_LOG_ERROR 

Definition at line 45 of file XnLog.h.


Function Documentation

This function closes a dump file (use it once file is no longer needed). You can later use xnDumpWriteString and xnDumpWriteBuffer to write to this file.

Parameters:
pDump[in] A pointer to an XnDump struct returned from a call to xnDumpInit.

Flushes a dump to the disk.

Parameters:
dump[in] The dump to flush.
XN_C_API void xnDumpForceInit ( XnDump pDump,
const XnChar csHeader,
const XnChar csFileNameFormat,
  ... 
)

This function creates an XnDump object through which dumps can be written. This dump will be created anyway, and does not depend on log configuration.

Parameters:
pDump[in] A handle to the dump.
csHeader[in] A header line to be written to the file. When this param is NULL, file will be opened as a binary file. When param is not NULL, the string will be written to the file once it is open.
csFileNameFormat[in] Format of the name to give the file.
...[in] Arguments for the file name format string.
XN_C_API void xnDumpInit ( XnDump pDump,
const XnChar csDumpMask,
const XnChar csHeader,
const XnChar csFileNameFormat,
  ... 
)

This function creates an XnDump object through which dumps can be written. Dump will only be created if the mask is enabled.

Parameters:
pDump[in] A handle to the dump.
csDumpMask[in] The mask under which this dump should be written.
csHeader[in] A header line to be written to the file. When this param is NULL, file will be opened as a binary file. When param is not NULL, the string will be written to the file once it is open.
csFileNameFormat[in] Format of the name to give the file.
...[in] Arguments for the file name format string.
XN_C_API XnStatus xnDumpSetMaskState ( const XnChar csMask,
XnBool  bEnabled 
)

Configures if a specific dump mask is enabled.

Parameters:
csMask[in] The mask to set.
bEnabled[in] TRUE to enable this mask, FALSE otherwise.
void xnDumpWriteBuffer ( XnDump  dump,
const void pBuffer,
XnUInt32  nBufferSize 
) [inline]

Definition at line 250 of file XnLog.h.

XN_C_API void xnDumpWriteBufferImpl ( XnDump  dump,
const void pBuffer,
XnUInt32  nBufferSize 
)

Writes a buffer to the dump.

Parameters:
dump[in] The dump to write to.
pBuffer[in] A pointer to the buffer to write.
nBufferSize[in] The number of bytes to write from the buffer.
XN_C_API void xnDumpWriteStringImpl ( XnDump  dump,
const XnChar csFormat,
  ... 
)

Writes a formatted string to the dump.

Parameters:
dump[in] The dump to write to.
csFormat[in] A format string.
...[in] Arguments to the format string.

This function closes the log.

XN_C_API XnStatus xnLogInitFromINIFile ( const XnChar csINIFile,
const XnChar csSectionName 
)

This function initializes the log from an INI file.

Parameters:
csINIFile[in] The name of the INI file.
csSectionName[in] The name of the section to read values from.
XN_C_API XnStatus xnLogInitFromXmlFile ( const XnChar strFileName)

This function initializes the log from an XML file.

Parameters:
strFileName[in] The name of the XML file.

This function initializes the log system.

XN_C_API XnBool xnLogIsDumpMaskEnabled ( const XnChar csDumpMask)

This function checks if a dump mask is enabled

Parameters:
csDumpMask[in] The mask that should be checked.
XN_C_API XnBool xnLogIsEnabled ( const XnChar csLogMask,
XnLogSeverity  nSeverity 
)

This function checks if a mask is enabled.

Parameters:
csLogMask[in] The mask that should be checked.
nSeverity[in] The severity.

Configures if log entries will be printed to console.

Parameters:
bConsoleOutput[in] TRUE to print log entries to console, FALSE otherwise.

Configures if log entries will be printed to a log file.

Parameters:
bFileOutput[in] TRUE to print log entries to the file, FALSE otherwise.

Configures if log entries will include the file and line that caused them.

Parameters:
bLineInfo[in] TRUE to print file and line, FALSE otherwise
XN_C_API XnStatus xnLogSetMaskState ( const XnChar csMask,
XnBool  bEnabled 
)

Configures if a specific log mask is enabled.

Parameters:
csMask[in] The mask to set.
bEnabled[in] TRUE to enable this mask, FALSE otherwise.
XN_C_API XnStatus xnLogSetOutputFolder ( const XnChar strOutputFolder)

Configures the folder under which logs will be written.

Parameters:
strOutputFolder[in] Folder to write to

Configures the minimum severity the log will output.

Parameters:
nMinSeverity[in] The minimum severity to output.

This function closes current log file, and starts a new one

XN_C_API void xnLogWrite ( const XnChar csLogMask,
XnLogSeverity  nSeverity,
const XnChar csFile,
XnUInt32  nLine,
const XnChar csFormat,
  ... 
)

This function writes a formatted string to the log (only if the mask is turned on)

Parameters:
csLogMask[in] The mask under which this log should be written.
nSeverity[in] The severity of this log.
csFile[in] The name of the file writing this log entry.
nLine[in] The line number writing this log entry.
csFormat[in] A format string.
XN_C_API void xnLogWriteBinaryData ( const XnChar csLogMask,
XnLogSeverity  nSeverity,
const XnChar csFile,
XnUInt32  nLine,
XnUChar pBinData,
XnUInt32  nDataSize,
const XnChar csFormat,
  ... 
)

This function writes binary data as hex bytes (only if the mask is turned on).

Parameters:
csLogMask[in] The mask under which this log should be written.
nSeverity[in] The severity of this log.
csFile[in] The name of the file writing this log entry.
nLine[in] The line number writing this log entry.
pBinData[in] The binary data to be written.
nDataSize[in] The number of bytes in the binary data.
csFormat[in] A format string to precede the binary data.
XN_C_API void xnLogWriteNoEntry ( const XnChar csLogMask,
XnLogSeverity  nSeverity,
const XnChar csFormat,
  ... 
)

This function writes a formatted string to the log (only if the mask is turned on), but without marking the timestamp, and without placing the end-of-line marker. It is used for writing complex data to the log file.

Parameters:
csLogMask[in] The mask under which this log should be written.
nSeverity[in] The severity of this log.
csFormat[in] A format string.

Variable Documentation

Definition at line 69 of file XnLog.h.



nao_openni
Author(s): Bener SUAY
autogenerated on Mon Jan 6 2014 11:27:51