OpenNI 1.5.7
XnLog.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * *
3 * OpenNI 1.x Alpha *
4 * Copyright (C) 2012 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * Licensed under the Apache License, Version 2.0 (the "License"); *
9 * you may not use this file except in compliance with the License. *
10 * You may obtain a copy of the License at *
11 * *
12 * http://www.apache.org/licenses/LICENSE-2.0 *
13 * *
14 * Unless required by applicable law or agreed to in writing, software *
15 * distributed under the License is distributed on an "AS IS" BASIS, *
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
17 * See the License for the specific language governing permissions and *
18 * limitations under the License. *
19 * *
20 *****************************************************************************/
21 #ifndef _XN_LOG_H_
22 #define _XN_LOG_H_
23 
24 //---------------------------------------------------------------------------
25 // Includes
26 //---------------------------------------------------------------------------
27 #include "XnOS.h"
28 #include "XnLogTypes.h"
29 #include "XnDump.h"
30 
31 //---------------------------------------------------------------------------
32 // Exported Function Declaration
33 //---------------------------------------------------------------------------
34 
45 
52 XN_C_API XnStatus XN_C_DECL xnLogInitFromINIFile(const XnChar* csINIFile, const XnChar* csSectionName);
53 
59 XN_C_API XnStatus XN_C_DECL xnLogInitFromXmlFile(const XnChar* strFileName);
60 
64 XN_C_API XnStatus XN_C_DECL xnLogClose();
65 
66 // @}
67 
80 XN_C_API XnStatus XN_C_DECL xnLogSetMaskMinSeverity(const XnChar* strMask, XnLogSeverity minSeverity);
81 
89 XN_C_API XnLogSeverity XN_C_DECL xnLogGetMaskMinSeverity(const XnChar* strMask);
90 
91 // @}
92 
106 
112 XN_C_API void XN_C_DECL xnLogUnregisterLogWriter(XnLogWriter* pWriter);
113 
119 XN_C_API XnStatus XN_C_DECL xnLogSetConsoleOutput(XnBool bConsoleOutput);
120 
126 XN_C_API XnStatus XN_C_DECL xnLogSetFileOutput(XnBool bFileOutput);
127 
128 #if XN_PLATFORM == XN_PLATFORM_ANDROID_ARM
129 
133 XN_C_API XnStatus XN_C_DECL xnLogSetAndroidOutput(XnBool bAndroidOutput);
134 #endif
135 
136 // @}
137 
148 
154 XN_C_API XnStatus XN_C_DECL xnLogSetLineInfo(XnBool bLineInfo);
155 
161 XN_C_API XnStatus XN_C_DECL xnLogSetOutputFolder(const XnChar* strOutputFolder);
162 
169 XN_C_API XnStatus XN_C_DECL xnLogGetFileName(XnChar* strFileName, XnUInt32 nBufferSize);
170 
171 // @}
172 
184 XN_C_API XnLogger* XN_C_DECL xnLoggerOpen(const XnChar* strMask);
185 
198 XN_C_API void XN_C_DECL xnLoggerWrite(XnLogger* pLogger, XnLogSeverity severity, const XnChar* strFile, XnUInt32 nLine, const XnChar* strFormat, ...);
199 
207 XN_C_API void XN_C_DECL xnLoggerWriteNoEntry(XnLogger* pLogger, XnLogSeverity severity, const XnChar* strFormat, ...);
208 
220 XN_C_API void XN_C_DECL xnLoggerWriteBinaryData(XnLogger* pLogger, XnLogSeverity severity, const XnChar* strFile, XnUInt32 nLine, XnUChar* pBinData, XnUInt32 nDataSize, const XnChar* strFormat, ...);
221 
228 XN_C_API XnBool XN_C_DECL xnLoggerIsEnabled(XnLogger* pLogger, XnLogSeverity severity);
229 
235 XN_C_API void XN_C_DECL _xnLoggerClose(XnLogger* pLogger);
236 
242 #define xnLoggerClose(pLogger) \
243  { \
244  _xnLoggerClose(pLogger); \
245  pLogger = NULL; \
246  }
247 
248 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
249 
252  #define xnLoggerWriteHelper(pLogger, severity, csFormat, ...) \
253  if (pLogger != NULL && severity >= pLogger->nMinSeverity) \
254  { \
255  xnLoggerWrite(pLogger, severity, __FILE__, __LINE__, csFormat, __VA_ARGS__); \
256  }
257 
261  #define xnLoggerVerbose(pLogger, csFormat, ...) xnLoggerWriteHelper(pLogger, XN_LOG_VERBOSE, csFormat, __VA_ARGS__)
262 
265  #define xnLoggerInfo(pLogger, csFormat, ...) xnLoggerWriteHelper(pLogger, XN_LOG_INFO, csFormat, __VA_ARGS__)
266 
269  #define xnLoggerWarning(pLogger, csFormat, ...) xnLoggerWriteHelper(pLogger, XN_LOG_WARNING, csFormat, __VA_ARGS__)
270 
273  #define xnLoggerError(pLogger, csFormat, ...) xnLoggerWriteHelper(pLogger, XN_LOG_ERROR, csFormat, __VA_ARGS__)
274 
283  #define XN_RETURN_WITH_LOG(pLogger, nRetVal, severity, csFormat, ...) \
284  { \
285  xnLoggerWriteHelper(pLogger, severity, csFormat, __VA_ARGS__); \
286  return (nRetVal); \
287  }
288 
296  #define XN_RETURN_WITH_WARNING_LOG(pLogger, nRetVal, csFormat, ...) \
297  XN_RETURN_WITH_LOG(pLogger, nRetVal, XN_LOG_WARNING, csFormat, __VA_ARGS__)
298 
306  #define XN_RETURN_WITH_ERROR_LOG(pLogger, nRetVal, csFormat, ...) \
307  XN_RETURN_WITH_LOG(pLogger, nRetVal, XN_LOG_ERROR, csFormat, __VA_ARGS__)
308 
309 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
310  #define xnLoggerWriteHelper(pLogger, severity, csFormat, ...) \
311  if (pLogger != NULL && severity >= pLogger->nMinSeverity) \
312  { \
313  xnLoggerWrite(pLogger, severity, __FILE__, __LINE__, csFormat, ##__VA_ARGS__); \
314  }
315 
316  #define xnLoggerVerbose(pLogger, csFormat, ...) xnLoggerWriteHelper(pLogger, XN_LOG_VERBOSE, csFormat,## __VA_ARGS__)
317  #define xnLoggerInfo(pLogger, csFormat, ...) xnLoggerWriteHelper(pLogger, XN_LOG_INFO, csFormat, ##__VA_ARGS__)
318  #define xnLoggerWarning(pLogger, csFormat, ...) xnLoggerWriteHelper(pLogger, XN_LOG_WARNING, csFormat, ##__VA_ARGS__)
319  #define xnLoggerError(pLogger, csFormat, ...) xnLoggerWriteHelper(pLogger, XN_LOG_ERROR, csFormat, ##__VA_ARGS__)
320 
321  /* Writes to the log and returns nRetVal */
322  #define XN_RETURN_WITH_LOG(pLogger, nRetVal, severity, csFormat, ...) \
323  { \
324  xnLoggerWriteHelper(pLogger, severity, csFormat, ##__VA_ARGS__); \
325  return (nRetVal); \
326  }
327 
328  /* Logs a warning and returns nRetVal */
329  #define XN_RETURN_WITH_WARNING_LOG(pLogger, nRetVal, csFormat, ...) \
330  XN_RETURN_WITH_LOG(pLogger, nRetVal, XN_LOG_WARNING, csFormat, ##__VA_ARGS__)
331 
332  /* Logs an error and returns nRetVal */
333  #define XN_RETURN_WITH_ERROR_LOG(pLogger, nRetVal, csFormat, ...) \
334  XN_RETURN_WITH_LOG(pLogger, nRetVal, XN_LOG_ERROR, csFormat, ##__VA_ARGS__)
335 
336 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
337  #define xnLoggerWriteHelper(pLogger, severity, csFormat...) \
338  if (pLogger != NULL && severity >= pLogger->nMinSeverity) \
339  { \
340  xnLoggerWrite(pLogger, severity, __FILE__, __LINE__, csFormat); \
341  }
342 
343  #define xnLoggerVerbose(pLogger, csFormat...) xnLoggerWriteHelper(pLogger, XN_LOG_VERBOSE, csFormat)
344  #define xnLoggerInfo(pLogger, csFormat...) xnLoggerWriteHelper(pLogger, XN_LOG_INFO, csFormat)
345  #define xnLoggerWarning(pLogger, csFormat...) xnLoggerWriteHelper(pLogger, XN_LOG_WARNING, csFormat)
346  #define xnLoggerError(pLogger, csFormat...) xnLoggerWriteHelper(pLogger, XN_LOG_ERROR, csFormat)
347 
348  /* Writes to the log and returns nRetVal */
349  #define XN_RETURN_WITH_LOG(pLogger, nRetVal, severity, csFormat...) \
350  { \
351  xnLoggerWriteHelper(pLogger, severity, csFormat); \
352  return (nRetVal); \
353  }
354 
355  /* Logs a warning and returns nRetVal */
356  #define XN_RETURN_WITH_WARNING_LOG(pLogger, nRetVal, csFormat...) \
357  XN_RETURN_WITH_LOG(pLogger, nRetVal, XN_LOG_WARNING, csFormat)
358 
359  /* Logs an error and returns nRetVal */
360  #define XN_RETURN_WITH_ERROR_LOG(pLogger, nRetVal, csFormat...) \
361  XN_RETURN_WITH_LOG(pLogger, nRetVal, XN_LOG_ERROR, csFormat)
362 
363 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_NO_VAARGS
364  #define xnLoggerWriteHelper(pLogger, severity, csFormat, arg) \
365  if (pLogger != NULL && severity >= pLogger->nMinSeverity) \
366  { \
367  xnLoggerWrite(pLogger, severity, __FILE__, __LINE__, csFormat, arg); \
368  }
369 
370  #define xnLoggerVerbose(pLogger, csFormat, arg) xnLoggerWriteHelper(pLogger, XN_LOG_VERBOSE, csFormat, arg)
371  #define xnLoggerInfo(pLogger, csFormat, arg) xnLoggerWriteHelper(pLogger, XN_LOG_INFO, csFormat, arg)
372  #define xnLoggerWarning(pLogger, csFormat, arg) xnLoggerWriteHelper(pLogger, XN_LOG_WARNING, csFormat, arg)
373  #define xnLoggerError(pLogger, csFormat, arg) xnLoggerWriteHelper(pLogger, XN_LOG_ERROR, csFormat, arg)
374 
375  /* Writes to the log and returns nRetVal */
376  #define XN_RETURN_WITH_LOG(pLogger, nRetVal, severity, csFormat) \
377  { \
378  xnLoggerWriteHelper(pLogger, severity, csFormat); \
379  return (nRetVal); \
380  }
381 
382  /* Logs a warning and returns nRetVal */
383  #define XN_RETURN_WITH_WARNING_LOG(pLogger, nRetVal, csFormat) \
384  XN_RETURN_WITH_LOG(pLogger, nRetVal, XN_LOG_WARNING, csFormat)
385 
386  /* Logs an error and returns nRetVal */
387  #define XN_RETURN_WITH_ERROR_LOG(pLogger, nRetVal, csFormat) \
388  XN_RETURN_WITH_LOG(pLogger, nRetVal, XN_LOG_ERROR, csFormat)
389 
390 #else
391  #error Xiron Log - Unknown VAARGS type!
392 #endif
393 
394 // @}
395 
413 XN_C_API XnStatus XN_C_DECL xnLogCreateNewFile(const XnChar* strName, XnBool bSessionBased, XnChar* csFullPath, XnUInt32 nPathBufferSize, XN_FILE_HANDLE* phFile);
414 
415 // @}
416 
417 #define XN_MASK_RETVAL_CHECKS "RetValChecks"
418 
419 #if XN_PLATFORM == XN_PLATFORM_ARC
421 #else
423 #endif
424 
426 #define XN_IS_STATUS_OK_LOG_ERROR(what, nRetVal) \
427  if (nRetVal != XN_STATUS_OK) \
428  { \
429  xnLoggerError(XN_LOGGER_RETVAL_CHECKS, "Failed to " what ": %s", xnGetStatusString(nRetVal)); \
430  XN_ASSERT(FALSE); \
431  return (nRetVal); \
432  }
433 
434 
435 #ifndef __XN_NO_BC__
436 
437 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnLogSetMaskMinSeverity() instead") XN_C_DECL xnLogSetMaskState(const XnChar* csMask, XnBool bEnabled);
438 XN_C_API XnStatus XN_API_DEPRECATED("Please use xnLogSetMaskMinSeverity() instead") XN_C_DECL xnLogSetSeverityFilter(XnLogSeverity nMinSeverity);
439 XN_C_API XnBool XN_C_DECL xnLogIsEnabled(const XnChar* csLogMask, XnLogSeverity nSeverity);
440 XN_C_API void XN_C_DECL xnLogWrite(const XnChar* csLogMask, XnLogSeverity nSeverity, const XnChar* csFile, XnUInt32 nLine, const XnChar* csFormat, ...);
441 XN_C_API void XN_C_DECL xnLogWriteNoEntry(const XnChar* csLogMask, XnLogSeverity nSeverity, const XnChar* csFormat, ...);
442 XN_C_API void XN_C_DECL xnLogWriteBinaryData(const XnChar* csLogMask, XnLogSeverity nSeverity, const XnChar* csFile, XnUInt32 nLine, XnUChar* pBinData, XnUInt32 nDataSize, const XnChar* csFormat, ...);
443 XN_C_API XnStatus XN_API_DEPRECATED("Use xnLogCreateNewFile() instead") XN_C_DECL xnLogCreateFile(const XnChar* strFileName, XN_FILE_HANDLE* phFile);
444 XN_C_API XnStatus XN_API_DEPRECATED("Use xnLogCreateNewFile() instead") XN_C_DECL xnLogCreateFileEx(const XnChar* strFileName, XnBool bSessionBased, XN_FILE_HANDLE* phFile);
445 
446 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
447  #define xnLogVerbose(csLogMask, csFormat, ...) xnLogWrite(csLogMask, XN_LOG_VERBOSE, __FILE__, __LINE__, csFormat, __VA_ARGS__)
448  #define xnLogInfo(csLogMask, csFormat, ...) xnLogWrite(csLogMask, XN_LOG_INFO, __FILE__, __LINE__, csFormat, __VA_ARGS__)
449  #define xnLogWarning(csLogMask, csFormat, ...) xnLogWrite(csLogMask, XN_LOG_WARNING, __FILE__, __LINE__, csFormat, __VA_ARGS__)
450  #define xnLogError(csLogMask, csFormat, ...) xnLogWrite(csLogMask, XN_LOG_ERROR, __FILE__, __LINE__, csFormat, __VA_ARGS__)
451 
452  /* Writes to the log and returns nRetVal */
453  #define XN_LOG_RETURN(nRetVal, nSeverity, csLogMask, csFormat, ...) \
454  { \
455  xnLogWrite(csLogMask, nSeverity, __FILE__, __LINE__, csFormat, __VA_ARGS__); \
456  return (nRetVal); \
457  }
458 
459  /* Logs a warning and returns nRetVal */
460  #define XN_LOG_WARNING_RETURN(nRetVal, csLogMask, csFormat, ...) \
461  XN_LOG_RETURN(nRetVal, XN_LOG_WARNING, csLogMask, csFormat, __VA_ARGS__)
462 
463  /* Logs a warning and returns nRetVal */
464  #define XN_LOG_ERROR_RETURN(nRetVal, csLogMask, csFormat, ...) \
465  XN_LOG_RETURN(nRetVal, XN_LOG_ERROR, csLogMask, csFormat, __VA_ARGS__)
466 
467 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
468  #define xnLogVerbose(csLogMask, csFormat, ...) xnLogWrite(csLogMask, XN_LOG_VERBOSE, __FILE__, __LINE__, csFormat, ##__VA_ARGS__)
469  #define xnLogInfo(csLogMask, csFormat, ...) xnLogWrite(csLogMask, XN_LOG_INFO, __FILE__, __LINE__, csFormat, ##__VA_ARGS__)
470  #define xnLogWarning(csLogMask, csFormat, ...) xnLogWrite(csLogMask, XN_LOG_WARNING, __FILE__, __LINE__, csFormat, ##__VA_ARGS__)
471  #define xnLogError(csLogMask, csFormat, ...) xnLogWrite(csLogMask, XN_LOG_ERROR, __FILE__, __LINE__, csFormat, ##__VA_ARGS__)
472 
473  /* Writes to the log and returns nRetVal */
474  #define XN_LOG_RETURN(nRetVal, nSeverity, csLogMask, csFormat, ...) \
475  { \
476  xnLogWrite(csLogMask, nSeverity, __FILE__, __LINE__, csFormat, ##__VA_ARGS__); \
477  return (nRetVal); \
478  }
479 
480  /* Logs a warning and returns nRetVal */
481  #define XN_LOG_WARNING_RETURN(nRetVal, csLogMask, csFormat, ...) \
482  XN_LOG_RETURN(nRetVal, XN_LOG_WARNING, csLogMask, csFormat, ##__VA_ARGS__)
483 
484  /* Logs a warning and returns nRetVal */
485  #define XN_LOG_ERROR_RETURN(nRetVal, csLogMask, csFormat, ...) \
486  XN_LOG_RETURN(nRetVal, XN_LOG_ERROR, csLogMask, csFormat, ##__VA_ARGS__)
487 
488 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
489  #define xnLogVerbose(csLogMask, csFormat...) xnLogWrite(csLogMask, XN_LOG_VERBOSE, __FILE__, __LINE__, csFormat)
490  #define xnLogInfo(csLogMask, csFormat...) xnLogWrite(csLogMask, XN_LOG_INFO, __FILE__, __LINE__, csFormat)
491  #define xnLogWarning(csLogMask, csFormat...) xnLogWrite(csLogMask, XN_LOG_WARNING, __FILE__, __LINE__, csFormat)
492  #define xnLogError(csLogMask, csFormat...) xnLogWrite(csLogMask, XN_LOG_ERROR, __FILE__, __LINE__, csFormat)
493 
494  /* Writes to the log and returns nRetVal */
495  #define XN_LOG_RETURN(nRetVal, nSeverity, csLogMask, csFormat...) \
496  { \
497  xnLogWrite(csLogMask, nSeverity, __FILE__, __LINE__, csFormat); \
498  return (nRetVal); \
499  }
500 
501  /* Logs a warning and returns nRetVal */
502  #define XN_LOG_WARNING_RETURN(nRetVal, csLogMask, csFormat...) \
503  XN_LOG_RETURN(nRetVal, XN_LOG_WARNING, csLogMask, csFormat)
504 
505  /* Logs a warning and returns nRetVal */
506  #define XN_LOG_ERROR_RETURN(nRetVal, csLogMask, csFormat...) \
507  XN_LOG_RETURN(nRetVal, XN_LOG_ERROR, csLogMask, csFormat)
508 
509  /* If nRetVal is not ok, writes to the log and returns nRetVal */
510  #define XN_IS_STATUS_OK_LOG(nRetVal, nSeverity, csLogMask, csFormat...) \
511  if (nRetVal != XN_STATUS_OK) \
512  { \
513  XN_LOG_RETURN(nRetVal, nSeverity, csLogMask, csFormat) \
514  }
515 
516  /* If nRetVal is not ok, logs a warning and returns nRetVal */
517  #define XN_IS_STATUS_OK_WARNING(nRetVal, csLogMask, csFormat...) \
518  XN_IS_STATUS_OK_LOG(nRetVal, XN_LOG_WARNING, csLogMask, csFormat)
519 
520  /* If nRetVal is not ok, logs an error and returns nRetVal */
521  #define XN_IS_STATUS_OK_ERROR(nRetVal, csLogMask, csFormat...) \
522  XN_IS_STATUS_OK_LOG(nRetVal, XN_LOG_ERROR, csLogMask, csFormat)
523 
524 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_NO_VAARGS
525  #define xnLogVerbose(csLogMask, csFormat, args) xnLogWrite(csLogMask, XN_LOG_VERBOSE, __FILE__, __LINE__, csFormat, args)
526  #define xnLogInfo(csLogMask, csFormat, args) xnLogWrite(csLogMask, XN_LOG_INFO, __FILE__, __LINE__, csFormat, args)
527  #define xnLogWarning(csLogMask, csFormat, args) xnLogWrite(csLogMask, XN_LOG_WARNING, __FILE__, __LINE__, csFormat, args)
528  #define xnLogError(csLogMask, csFormat, args) xnLogWrite(csLogMask, XN_LOG_ERROR, __FILE__, __LINE__, csFormat, args)
529 
530  /* Writes to the log and returns nRetVal */
531  #define XN_LOG_RETURN(nRetVal, nSeverity csLogMask, csFormat, args) \
532  { \
533  xnLogWrite(csLogMask, nSeverity, __FILE__, __LINE__, csFormat, args); \
534  return (nRetVal); \
535  }
536 
537  /* Logs a warning and returns nRetVal */
538  #define XN_LOG_WARNING_RETURN(nRetVal, csLogMask, csFormat, args) \
539  XN_LOG_RETURN(nRetVal, XN_LOG_WARNING, csLogMask, csFormat, args)
540 
541  /* Logs an error and returns nRetVal */
542  #define XN_LOG_ERROR_RETURN(nRetVal, csLogMask, csFormat, args) \
543  XN_LOG_RETURN(nRetVal, XN_LOG_ERROR, csLogMask, csFormat, args)
544 
545 #else
546  #error Xiron Log - Unknown VAARGS type!
547 #endif
548 
549 #endif // ifndef __XN_NO_BC__
550 
551 #endif //_XN_LOG_H_
552 
XN_C_API void XN_C_DECL xnLoggerWriteBinaryData(XnLogger *pLogger, XnLogSeverity severity, const XnChar *strFile, XnUInt32 nLine, XnUChar *pBinData, XnUInt32 nDataSize, const XnChar *strFormat,...)
XnLogSeverity
Definition: XnLogTypes.h:41
XN_C_API void XN_C_DECL xnLoggerWriteNoEntry(XnLogger *pLogger, XnLogSeverity severity, const XnChar *strFormat,...)
XN_C_API XnStatus XN_C_DECL xnLogSetLineInfo(XnBool bLineInfo)
XN_C_API XnStatus XN_C_DECL xnLogGetFileName(XnChar *strFileName, XnUInt32 nBufferSize)
XN_C_API XnStatus XN_C_DECL xnLogStartNewFile()
XnUInt32 XnStatus
Definition: XnStatus.h:33
Definition: XnLogTypes.h:70
XN_C_API XnLogger *XN_C_DECL xnLoggerOpen(const XnChar *strMask)
XN_C_API XnStatus XN_C_DECL xnLogInitFromINIFile(const XnChar *csINIFile, const XnChar *csSectionName)
XN_C_API XnStatus XN_C_DECL xnLogSetMaskMinSeverity(const XnChar *strMask, XnLogSeverity minSeverity)
XN_C_API XnStatus XN_C_DECL xnLogSetConsoleOutput(XnBool bConsoleOutput)
XN_C_API XnStatus XN_C_DECL xnLogRegisterLogWriter(XnLogWriter *pWriter)
XN_C_API XnStatus XN_C_DECL xnLogInitFromXmlFile(const XnChar *strFileName)
XN_C_API XnLogSeverity XN_C_DECL xnLogGetMaskMinSeverity(const XnChar *strMask)
#define XN_C_API
Definition: XnPlatform.h:121
XN_C_API void XN_C_DECL xnLogUnregisterLogWriter(XnLogWriter *pWriter)
XN_C_API XnStatus XN_C_DECL xnLogSetFileOutput(XnBool bFileOutput)
XN_C_API XnStatus XN_C_DECL xnLogInitSystem()
XN_C_API XnLogger * XN_LOGGER_RETVAL_CHECKS
Definition: XnLog.h:422
Definition: XnLogTypes.h:53
XN_C_API void XN_C_DECL xnLoggerWrite(XnLogger *pLogger, XnLogSeverity severity, const XnChar *strFile, XnUInt32 nLine, const XnChar *strFormat,...)
XN_C_API XnStatus XN_C_DECL xnLogCreateNewFile(const XnChar *strName, XnBool bSessionBased, XnChar *csFullPath, XnUInt32 nPathBufferSize, XN_FILE_HANDLE *phFile)
XN_C_API XnStatus XN_C_DECL xnLogSetOutputFolder(const XnChar *strOutputFolder)
XN_C_API XnStatus XN_C_DECL xnLogClose()
XN_C_API XnBool XN_C_DECL xnLoggerIsEnabled(XnLogger *pLogger, XnLogSeverity severity)