#include "sbgDefines.h"
Go to the source code of this file.
Macros | |
#define | SBG_DEBUG_LOG_CATEGORY ("None") |
Define and handle error logging for the SBG Systems common C library. More... | |
#define | SBG_LOG_DEBUG(format, ...) ((void)sizeof(SBG_LOG_DEBUG_CALL(format, ## __VA_ARGS__))) |
#define | SBG_LOG_DEBUG_CALL(format, ...) sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_CATEGORY, SBG_DEBUG_LOG_TYPE_DEBUG, SBG_NO_ERROR, format, ##__VA_ARGS__) |
#define | SBG_LOG_ERROR(format, ...) ((void)sizeof(SBG_LOG_ERROR_CALL(format, ## __VA_ARGS__))) |
#define | SBG_LOG_ERROR_CALL(errorCode, format, ...) sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_CATEGORY, SBG_DEBUG_LOG_TYPE_ERROR, errorCode, format, ##__VA_ARGS__) |
#define | SBG_LOG_INFO(format, ...) ((void)sizeof(SBG_LOG_INFO_CALL(format, ## __VA_ARGS__))) |
#define | SBG_LOG_INFO_CALL(format, ...) sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_CATEGORY, SBG_DEBUG_LOG_TYPE_INFO, SBG_NO_ERROR, format, ##__VA_ARGS__) |
#define | SBG_LOG_WARNING(format, ...) ((void)sizeof(SBG_LOG_WARNING_CALL(format, ## __VA_ARGS__))) |
#define | SBG_LOG_WARNING_CALL(errorCode, format, ...) sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_CATEGORY, SBG_DEBUG_LOG_TYPE_WARNING, errorCode, format, ##__VA_ARGS__) |
Typedefs | |
typedef enum _SbgDebugLogType | SbgDebugLogType |
Enumerations | |
enum | _SbgDebugLogType { SBG_DEBUG_LOG_TYPE_ERROR, SBG_DEBUG_LOG_TYPE_WARNING, SBG_DEBUG_LOG_TYPE_INFO, SBG_DEBUG_LOG_TYPE_DEBUG } |
Functions | |
const SBG_INLINE char * | sbgDebugLogTypeToStr (SbgDebugLogType logType) |
#define SBG_DEBUG_LOG_CATEGORY ("None") |
Define and handle error logging for the SBG Systems common C library.
\file sbgDebug.h
The methods defined here should be implemented in sbgPlatform.h/sbgPlatform.c according to your platform and needs.
Copyright (C) 2007-2015, SBG Systems SAS. All rights reserved.
This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
Definition at line 30 of file sbgDebug.h.
#define SBG_LOG_DEBUG | ( | format, | |
... | |||
) | ((void)sizeof(SBG_LOG_DEBUG_CALL(format, ## __VA_ARGS__))) |
Definition at line 99 of file sbgDebug.h.
#define SBG_LOG_DEBUG_CALL | ( | format, | |
... | |||
) | sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_CATEGORY, SBG_DEBUG_LOG_TYPE_DEBUG, SBG_NO_ERROR, format, ##__VA_ARGS__) |
Log an information message only in debug mode
[in] | format | String litteral for the information message (you can use printf like string formating). |
Definition at line 94 of file sbgDebug.h.
#define SBG_LOG_ERROR | ( | format, | |
... | |||
) | ((void)sizeof(SBG_LOG_ERROR_CALL(format, ## __VA_ARGS__))) |
Definition at line 62 of file sbgDebug.h.
#define SBG_LOG_ERROR_CALL | ( | errorCode, | |
format, | |||
... | |||
) | sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_CATEGORY, SBG_DEBUG_LOG_TYPE_ERROR, errorCode, format, ##__VA_ARGS__) |
Log an error with its associated message.
[in] | errorCode | The error code that has thrown this error. |
[in] | format | String litteral for the associated error message (you can use printf like string formating). |
Definition at line 57 of file sbgDebug.h.
#define SBG_LOG_INFO | ( | format, | |
... | |||
) | ((void)sizeof(SBG_LOG_INFO_CALL(format, ## __VA_ARGS__))) |
Definition at line 87 of file sbgDebug.h.
#define SBG_LOG_INFO_CALL | ( | format, | |
... | |||
) | sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_CATEGORY, SBG_DEBUG_LOG_TYPE_INFO, SBG_NO_ERROR, format, ##__VA_ARGS__) |
Log an information message.
[in] | format | String litteral for the information message (you can use printf like string formating). |
Definition at line 82 of file sbgDebug.h.
#define SBG_LOG_WARNING | ( | format, | |
... | |||
) | ((void)sizeof(SBG_LOG_WARNING_CALL(format, ## __VA_ARGS__))) |
Definition at line 75 of file sbgDebug.h.
#define SBG_LOG_WARNING_CALL | ( | errorCode, | |
format, | |||
... | |||
) | sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_CATEGORY, SBG_DEBUG_LOG_TYPE_WARNING, errorCode, format, ##__VA_ARGS__) |
Log a warning with its associated message.
[in] | errorCode | The error code that has thrown this warning. |
[in] | format | String litteral for the associated warning message (you can use printf like string formating). |
Definition at line 70 of file sbgDebug.h.
typedef enum _SbgDebugLogType SbgDebugLogType |
Enum that identify the type of error / warning that has been thrown.
enum _SbgDebugLogType |
Enum that identify the type of error / warning that has been thrown.
Definition at line 40 of file sbgDebug.h.
const SBG_INLINE char* sbgDebugLogTypeToStr | ( | SbgDebugLogType | logType | ) |
Convert a log type into a string representation.
[in] | logType | Log type. |
Definition at line 112 of file sbgDebug.h.