WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
dfx

宏定义

#define SOC_LOG_LEVEL_DEFAULT   SOC_LOG_LEVEL_INFO
 
#define LOG_FUNC_TRACE   0
 
#define LOG_UNF_TRACE   0
 
#define LOG_MODULE_ID   SOC_ID_RESERVED
 
#define SOC_TRACE_LEVEL_ALERT   (0)
 
#define SOC_TRACE_LEVEL_FATAL   (1)
 
#define SOC_TRACE_LEVEL_ERROR   (2)
 
#define SOC_TRACE_LEVEL_WARN   (3)
 
#define SOC_TRACE_LEVEL_NOTICE   (4)
 
#define SOC_TRACE_LEVEL_INFO   (5)
 
#define SOC_TRACE_LEVEL_DBG   (6)
 
#define SOC_TRACE_LEVEL_TRACE   (7)
 
#define uapi_log_info   soc_log_info
 
#define uapi_log_warn   soc_log_warn
 
#define uapi_log_err   soc_log_err
 

枚举

enum  soc_log_level {
  SOC_LOG_LEVEL_ALERT = 0 , SOC_LOG_LEVEL_FATAL = 1 , SOC_LOG_LEVEL_ERROR = 2 , SOC_LOG_LEVEL_WARNING = 3 ,
  SOC_LOG_LEVEL_NOTICE = 4 , SOC_LOG_LEVEL_INFO = 5 , SOC_LOG_LEVEL_DBG = 6 , SOC_LOG_LEVEL_TRACE = 7 ,
  SOC_LOG_LEVEL_MAX
}
 

详细描述

宏定义说明

◆ LOG_FUNC_TRACE

#define LOG_FUNC_TRACE   0

SDK internal Use only. Allow modules to modify, If the related module does not define it, no information output.

◆ LOG_MODULE_ID

#define LOG_MODULE_ID   SOC_ID_RESERVED

SDK internal use only. Allow modules to modify, default value is SOC_ID_SYS.

◆ LOG_UNF_TRACE

#define LOG_UNF_TRACE   0

SDK internal Use Only. Allow modules to modify, If the related module does not define it, no information output.

◆ SOC_LOG_LEVEL_DEFAULT

#define SOC_LOG_LEVEL_DEFAULT   SOC_LOG_LEVEL_INFO

Default level of the output debugging information. CNcomment: 默认的调试信息输出级别.CNend

◆ SOC_TRACE_LEVEL_ALERT

#define SOC_TRACE_LEVEL_ALERT   (0)

Just only for alert level print. CNcomment: 为了打印告警信息而制定的宏打印级别CNend

◆ SOC_TRACE_LEVEL_DBG

#define SOC_TRACE_LEVEL_DBG   (6)

Just only for debug level print. CNcomment: 为了打印调试信息而制定的宏打印级别CNend

◆ SOC_TRACE_LEVEL_ERROR

#define SOC_TRACE_LEVEL_ERROR   (2)

Just only for error level print. CNcomment: 为了打印错误信息而制定的宏打印级别CNend

◆ SOC_TRACE_LEVEL_FATAL

#define SOC_TRACE_LEVEL_FATAL   (1)

Just only for fatal level print. CNcomment: 为了打印致命信息而制定的宏打印级别CNend

◆ SOC_TRACE_LEVEL_INFO

#define SOC_TRACE_LEVEL_INFO   (5)

Just only for info level print. CNcomment: 为了打印信息级别而制定的宏打印级别CNend

◆ SOC_TRACE_LEVEL_NOTICE

#define SOC_TRACE_LEVEL_NOTICE   (4)

Just only for notice level print. CNcomment: 为了打印注意信息而制定的宏打印级别CNend

◆ SOC_TRACE_LEVEL_TRACE

#define SOC_TRACE_LEVEL_TRACE   (7)

Just only for trace level print. CNcomment: 为了打印接口跟踪信息而制定的宏打印级别CNend

◆ SOC_TRACE_LEVEL_WARN

#define SOC_TRACE_LEVEL_WARN   (3)

Just only for warning level print. CNcomment: 为了打印警告信息而制定的宏打印级别CNend

◆ uapi_log_err

#define uapi_log_err   soc_log_err

Include SOC_DEBUG.Supported for debug output to serial/network/u-disk.

描述:
Include SOC_DEBUG.Supported for debug output to serial/network/u-disk.
CNcomment: 定义SOC_DEBUG宏时。各个模块需要调用该宏进行输出错误级别的调试信息, 可输出到串口、网口、U盘存储等CNend
注意
当打印等级 CONFIG_SOCT_LOG_LEVEL 在 SOC_TRACE_LEVEL_ERROR 及以上时, 可使用
参数
fmt[IN] 打印输出信息
返回值
NoneNone
依赖:
参见
None

◆ uapi_log_info

#define uapi_log_info   soc_log_info

Just only reserve the alert/fatal/error/warning level output. CNcomment: 仅仅保留致命的、错误的、警告级别的调试信息CNend

Include SOC_DEBUG.Supported for debug output to serial/network/u-disk.

描述:
Include SOC_DEBUG.Supported for debug output to serial/network/u-disk.
CNcomment: 定义SOC_DEBUG宏时。各个模块需要调用该宏进行输出信息级别的调试信息, 可输出到串口、网口、U盘存储等CNend
注意
当打印等级 CONFIG_SOCT_LOG_LEVEL 在 SOC_TRACE_LEVEL_INFO 及以上时, 可使用
参数
fmt[IN] 打印输出信息
返回值
NoneNone
依赖:
参见
None

◆ uapi_log_warn

#define uapi_log_warn   soc_log_warn

Include SOC_DEBUG.Supported for debug output to serial/network/u-disk.

描述:
Include SOC_DEBUG.Supported for debug output to serial/network/u-disk.
CNcomment: 定义SOC_DEBUG宏时。各个模块需要调用该宏进行输出警告级别的调试信息, 可输出到串口、网口、U盘存储等CNend
注意
当打印等级 CONFIG_SOCT_LOG_LEVEL 在 SOC_TRACE_LEVEL_WARN 及以上时, 可使用
参数
fmt[IN] 打印输出信息
返回值
NoneNone
依赖:
参见
None

枚举类型说明

◆ soc_log_level

Level of the output debugging information. CNcomment: 调试信息输出级别.CNend

枚举值
SOC_LOG_LEVEL_ALERT 

Alert information. It indicates that a important exception occurs in the system.action must be taken immediately.
CNcomment: 警告信息, 此类错误默认不打印到串口, 默认打印到BBOX后台日志收集系统,用户系统重要状态 变化,非常重要的异常。CNend

SOC_LOG_LEVEL_FATAL 

Fatal error. It indicates that a Fatal problem occurs in the system. Therefore, you must pay attention to it.
CNcomment: 致命错误, 此类错误需要特别关注,一 般出现此类错误代表系统出现了重大问题CNend

SOC_LOG_LEVEL_ERROR 

Major error. It indicates that a major problem occurs in the system and the system cannot run.
CNcomment: 一般错误, 一般出现此类错误代表系统 出现了比较大的问题,不能再正常运行CNend

SOC_LOG_LEVEL_WARNING 

Warning. It indicates that a minor problem occurs in the system, but the system still can run properly.
CNcomment: 告警信息, 一般出现此类信息代表系统 可能出现问题,但是还能继续运行CNend

SOC_LOG_LEVEL_NOTICE 

Notice. It is used to prompt users. Users can open the message when locating problems.
CNcomment: 正常但重要的信息, 一般出现在系统的 关键路径调用上CNend

SOC_LOG_LEVEL_INFO 

INFO. It is used to prompt users. Users can open the message when locating problems.
It is recommended to disable this message in general.
CNcomment: 提示信息, 一般是为提醒用户而输出, 在定位问题的时候可以打开,一般情况下建议关闭CNend

SOC_LOG_LEVEL_DBG 

Debug. It is used to prompt developers. Developers can open the message when locating problems.
It is recommended to disable this message in general.
CNcomment: 提示信息, 一般是为开发人员调试问题 而设定的打印级别,一般情况下建议关闭CNend

SOC_LOG_LEVEL_TRACE 

Trace. It is used to track the entry and exit of function when the interface is called.
CNcomment: 提示信息,一般用于跟踪接口调用时函 数的进入与退出CNend

SOC_LOG_LEVEL_MAX