Define and handle error logging for the SBG Systems common C library. More...
#include "platform/sbgConfig.h"
Go to the source code of this file.
Macros | |
#define | SBG_ASSERT(expression) SBG_PLATFORM_ASSERT(expression) |
#define | SBG_LOG_ERROR(errorCode, format, ...) sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_ERROR, errorCode, format, ##__VA_ARGS__) |
#define | SBG_LOG_INFO(format, ...) sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_INFO, SBG_NO_ERROR, format, ##__VA_ARGS__) |
#define | SBG_LOG_VERBOSE(format, ...) sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_VERBOSE, SBG_NO_ERROR, format, ##__VA_ARGS__) |
#define | SBG_LOG_WARNING(errorCode, format, ...) sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, 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_VERBOSE } |
Define and handle error logging for the SBG Systems common C library.
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 in file sbgDebug.h.
#define SBG_ASSERT | ( | expression | ) | SBG_PLATFORM_ASSERT(expression) |
Run time assert that is raised if the expression is false.
[in] | expression | The boolean expression to test, the execution is interrupted if the expression is evaluated as false. |
Definition at line 52 of file sbgDebug.h.
#define SBG_LOG_ERROR | ( | errorCode, | |
format, | |||
... | |||
) | sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, 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 63 of file sbgDebug.h.
#define SBG_LOG_INFO | ( | format, | |
... | |||
) | sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, 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 84 of file sbgDebug.h.
#define SBG_LOG_VERBOSE | ( | format, | |
... | |||
) | sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_VERBOSE, SBG_NO_ERROR, format, ##__VA_ARGS__) |
Log an information message only in verbose mode
[in] | format | String litteral for the information message (you can use printf like string formating). |
Definition at line 93 of file sbgDebug.h.
#define SBG_LOG_WARNING | ( | errorCode, | |
format, | |||
... | |||
) | sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, 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 74 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 35 of file sbgDebug.h.