nl::Weave::Logging
Stay organized with collections
Save and categorize content based on your preferences.
This namespace includes all interfaces within Weave for shared logging support.
Summary
The interfaces include macros, constants, and functions for a platform-independent logging interface for the Weave SDK.
Weave SDK clients may choose, at compile time, among Android, C Standard I/O, or external (platform- and integrator-defined) logging style implementations that will be invoked when any of the following preprocessor symbols are asserted:
Enumerations |
|
---|---|
@406
|
enum |
LogCategory
|
enum Identifies a category to which an particular error message belongs. |
LogModule
|
enum Identifies a logical section of code that is a source of log messages. |
Typedefs |
|
---|---|
LogMessageFunct)(uint8_t module, uint8_t category, const char *msg, va_list ap)
|
typedefvoid(*
|
Variables |
|
---|---|
ModuleNames[]
|
const char
|
gLogFilter = kLogCategory_Max
|
uint8_t
|
gLogFunct = DefaultLogMessage
|
LogMessageFunct
|
Functions |
|
---|---|
GetCategoryName(char *buf, uint8_t bufSize, uint8_t category)
|
void
|
GetLogFilter()
|
NL_DLL_EXPORT uint8_t
|
GetMessageWithPrefix(char *buf, uint8_t bufSize, uint8_t module, const char *msg)
|
void
|
GetModuleName(char *buf, uint8_t module)
|
void
|
Log(uint8_t module, uint8_t category, const char *msg, ...)
|
NL_DLL_EXPORT __WEAVE_LOGGING_LINK_ATTRIBUTE void
Log, to the platform-specified mechanism, the specified log message, msg, for the specified module, module, in the provided category, category.
|
PrintMessagePrefix(uint8_t module)
|
void
|
SetLogFilter(uint8_t category)
|
NL_DLL_EXPORT void
|
SetLogFunct(LogMessageFunct logFunct)
|
NL_DLL_EXPORT void
|
Enumerations
@406
@406
LogCategory
LogCategory
Identifies a category to which an particular error message belongs.
LogModule
LogModule
Identifies a logical section of code that is a source of log messages.
Typedefs
LogMessageFunct
void(* LogMessageFunct)(uint8_t module, uint8_t category, const char *msg, va_list ap)
Variables
ModuleNames
const char ModuleNames[]
gLogFilter
uint8_t gLogFilter = kLogCategory_Max
gLogFunct
LogMessageFunct gLogFunct = DefaultLogMessage
Functions
GetCategoryName
void GetCategoryName( char *buf, uint8_t bufSize, uint8_t category )
GetLogFilter
NL_DLL_EXPORT uint8_t GetLogFilter()
GetMessageWithPrefix
void GetMessageWithPrefix( char *buf, uint8_t bufSize, uint8_t module, const char *msg )
GetModuleName
void GetModuleName( char *buf, uint8_t module )
Log
NL_DLL_EXPORT __WEAVE_LOGGING_LINK_ATTRIBUTE void Log( uint8_t module, uint8_t category, const char *msg, ... )
Log, to the platform-specified mechanism, the specified log message, msg, for the specified module, module, in the provided category, category.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
PrintMessagePrefix
void PrintMessagePrefix( uint8_t module )
SetLogFilter
NL_DLL_EXPORT void SetLogFilter( uint8_t category )
SetLogFunct
NL_DLL_EXPORT void SetLogFunct( LogMessageFunct logFunct )