XDK API  3.6.0
Documentation
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
BCDS_Logging.h File Reference
#include "BCDS_Utils.h"
#include <stdarg.h>
#include "BCDS_Basics.h"
#include "BCDS_Retcode.h"
#include "LogConfig.h"
+ Include dependency graph for BCDS_Logging.h:

Data Structures

struct  LogAppender_T
 A log recorder operations type. More...
 
struct  LogRecorder_T
 A log recorder operations type. More...
 

Macros

#define LOG(...)   do {} while(0)
 
#define LOG_DEBUG(...)   do {} while(0)
 
#define LOG_ERROR(...)   do {} while(0)
 
#define LOG_FATAL(...)   do {} while(0)
 
#define LOG_INFO(...)   do {} while(0)
 
#define LOG_LEVEL_COMPOSE(a, b)   (a ## b)
 
#define LOG_LEVEL_GET_CURRENT()   (MIN(LOG_LEVEL_GET_CURRENT_PACKAGE(), LOG_LEVEL_GET_CURRENT_MODULE()))
 A macro to get log level for the current package module. More...
 
#define LOG_LEVEL_GET_CURRENT_MODULE()   (LOG_LEVEL_VAR(BCDS_MODULE_ID))
 A macro to get current module log level. More...
 
#define LOG_LEVEL_GET_CURRENT_PACKAGE()   (LOG_LEVEL_VAR(BCDS_PACKAGE_ID))
 A macro to get current package log level. More...
 
#define LOG_LEVEL_SET_MODULE(module, level)   LOG_LEVEL_VAR(module) = (uint8_t) level;
 A macro to set module log level in runtime. More...
 
#define LOG_LEVEL_SET_PACKAGE(package, level)   LOG_LEVEL_VAR(package) = (uint8_t) level;
 A macro to set package log level in runtime. More...
 
#define LOG_LEVEL_VAR(a)   LOG_LEVEL_COMPOSE(__log_level_, a)
 
#define LOG_WARNING(...)   do {} while(0)
 
#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
 

Typedefs

typedef Retcode_T(* LogAppenderInit_T )(void *wakeup)
 A function pointer type to log appender initializer. More...
 
typedef Retcode_T(* LogAppenderWrite_T )(const char *message, uint32_t length)
 A function pointer type to log appender writer. More...
 
typedef uint32_t LogFilterId_T
 Log filter id type. More...
 
typedef Retcode_T(* LogRecordDeinit_T )(void *self)
 A function pointer type to log recorder deinitializer. More...
 
typedef Retcode_T(* LogRecordInit_T )(void *self)
 A function pointer type to log recorder initializer. More...
 
typedef Retcode_T(* LogRecordWrite_T )(LogLevel_T level, uint8_t package, uint8_t module, const char *file, uint32_t line, const char *fmt, va_list args)
 A function pointer type to log recorder writer. More...
 
typedef __builtin_va_list va_list
 

Enumerations

enum  LogLevel_T
 Enumeration of supported log levels. More...
 

Functions

uint8_t LOG_LEVEL_VAR (BCDS_PACKAGE_ID)
 External reference to package log level variable. More...
 
uint8_t LOG_LEVEL_VAR (BCDS_MODULE_ID)
 External reference to module log level variable. More...
 
LogFilterId_T LogFilter_Add (LogLevel_T level, uint8_t package, uint8_t module)
 Adds log filter item. More...
 
bool LogFilter_Apply (LogLevel_T level, uint8_t package, uint8_t module)
 An internal function to check if there is matching filter present. More...
 
Retcode_T LogFilter_Configure (LogFilterId_T id, LogLevel_T level, uint8_t package, uint8_t module)
 Modifies existing log filter item. More...
 
Retcode_T LogFilter_Delete (LogFilterId_T id)
 Deletes log filter item. More...
 
Retcode_T Logging_Init (const LogRecorder_T *recorder, const LogAppender_T *appender)
 Initializes the log recorder and appender engines. More...
 
Retcode_T Logging_Log (LogLevel_T level, uint8_t package, uint8_t module, const char *file, uint32_t line, const char *fmt,...)
 Log a message. More...
 

Variables

const LogRecorder_TLogging_AsyncRecorder
 External reference to log asynchronous recorder. More...
 
const LogAppender_TLogging_ExtFlashMemAppender
 External reference to log external flash appender. More...
 
const LogAppender_TLogging_SwoAppender
 External reference to log SWO appender. More...
 
const LogRecorder_TLogging_SyncRecorder
 External reference to log synchronous recorder. More...
 
const LogAppender_TLogging_UARTAppender
 External reference to log UART appender. More...
 

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:49 by doxygen 1.8.8