You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typedefenum {
ELOG_FMT_LVL=1 << 0, /**< level */ELOG_FMT_TAG=1 << 1, /**< tag */ELOG_FMT_TIME=1 << 2, /**< current time */ELOG_FMT_P_INFO=1 << 3, /**< process info */ELOG_FMT_T_INFO=1 << 4, /**< thread info */ELOG_FMT_DIR=1 << 5, /**< file directory and name */ELOG_FMT_FUNC=1 << 6, /**< function name */ELOG_FMT_LINE=1 << 7, /**< line number */#ifdefELOG_FILE_ENABLEELOG_FMT_FILE_SAVE=1 << 8, /**< file write */#endif
} ElogFmtIndex;
写FLASH/文件系统的操作,不应该在PORT层中,用户也许会希望控制某个级别的LOG,来决定是否写入FLASH/文件系统。
比如, assert, error, warning写入文件系统,而其他lv不写入。
目前我的做法是简单的复用了FMT,在elog.c中来决定是根据标志来决定是否写入文件/FLASH。
由于FMT是格式化用的,可能不是很妥当,但这样做法比较灵活,也可以单独设置一个FILE level,大于某个LV的来决定是否要写入文件。
The text was updated successfully, but these errors were encountered: