nl:: Weave:: Logging
מרחב השמות הזה כולל את כל הממשקים ב-Weave לקבלת תמיכה ברישום ביומן משותף.
סיכום
הממשקים כוללים פקודות מאקרו, קבועים ופונקציות עבור ממשק רישום ביומן בלתי תלוי בפלטפורמה עבור Weave SDK.
לקוחות Weave SDK יכולים לבחור, בזמן ההידור, הטמעות של סגנון רישום ביומן ב-Android, בתקן C Standard I/O או בהטמעות של סגנון רישום ביומן (בהגדרת הפלטפורמה ובהגדרת השילוב), שיופעלו כאשר יוצהרו כל הסמלים הבאים של מעבדי מידע מראש:
ספירות |
|
---|---|
@406
|
טיפוסים בני מנייה (enum) |
LogCategory
|
טיפוסים בני מנייה (enum) מזהה קטגוריה שאליה שייכת הודעת שגיאה מסוימת. |
LogModule
|
טיפוסים בני מנייה (enum) מזהה קטע לוגי בקוד שהוא מקור להודעות ביומן. |
ערכי דף |
|
---|---|
LogMessageFunct)(uint8_t module, uint8_t category, const char *msg, va_list ap)
|
typedefvoid(*
|
משתנים |
|
---|---|
ModuleNames[]
|
const char
|
gLogFilter = kLogCategory_Max
|
uint8_t
|
gLogFunct = DefaultLogMessage
|
LogMessageFunct
|
פונקציות |
|
---|---|
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
רישום ביומן, למנגנון שצוין בפלטפורמה, הודעת היומן שצוינה, msg, למודול שצוין, המודול, בקטגוריה שצוינה, category.
|
PrintMessagePrefix(uint8_t module)
|
void
|
SetLogFilter(uint8_t category)
|
NL_DLL_EXPORT void
|
SetLogFunct(LogMessageFunct logFunct)
|
NL_DLL_EXPORT void
|
ספירות
@406
@406
LogCategory
LogCategory
מזהה קטגוריה שאליה שייכת הודעת שגיאה מסוימת.
LogModule
LogModule
מזהה קטע לוגי בקוד שהוא מקור להודעות ביומן.
ערכי דף
LogMessageFunct
void(* LogMessageFunct)(uint8_t module, uint8_t category, const char *msg, va_list ap)
משתנים
ModuleNames
const char ModuleNames[]
gLogFilter
uint8_t gLogFilter = kLogCategory_Max
gLogFunct
LogMessageFunct gLogFunct = DefaultLogMessage
פונקציות
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 )
יומן
NL_DLL_EXPORT __WEAVE_LOGGING_LINK_ATTRIBUTE void Log( uint8_t module, uint8_t category, const char *msg, ... )
רישום ביומן, למנגנון שצוין בפלטפורמה, הודעת היומן שצוינה, msg, למודול שצוין, המודול, בקטגוריה שצוינה, category.
פרטים | |||||||||
---|---|---|---|---|---|---|---|---|---|
פרמטרים |
|
PrintMessagePrefix
void PrintMessagePrefix( uint8_t module )
SetLogFilter
NL_DLL_EXPORT void SetLogFilter( uint8_t category )
SetLogFunct
NL_DLL_EXPORT void SetLogFunct( LogMessageFunct logFunct )