nl::Weave::Logging

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

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.

Variables

ModuleNames[]
const char
gLogFilter = kLogCategory_Max
uint8_t

Functions

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
PrintMessagePrefix(uint8_t module)
void
SetLogFilter(uint8_t category)
NL_DLL_EXPORT void

Enumerations

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.

Variables

ModuleNames

const char ModuleNames[]

gLogFilter

uint8_t gLogFilter = kLogCategory_Max

Functions

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,
  ...
)

PrintMessagePrefix

void PrintMessagePrefix(
  uint8_t module
)

SetLogFilter

NL_DLL_EXPORT void SetLogFilter(
  uint8_t category
)