mcu_hi3321_watch/include/middleware/utils/diag_log.h
2025-05-26 20:15:20 +08:00

111 lines
3.6 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Copyright (c) @CompanyNameMagicTag 2021-2023. All rights reserved. \n
* Description: header file for diag log. \n
* Author: @CompanyNameTag \n
*/
#ifndef DIAG_LOG_H
#define DIAG_LOG_H
#include "soc_diag_log.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
/**
* @defgroup middleware_utils_dfx_log Log
* @ingroup middleware_utils_dfx
* @{
*/
/**
* @if Eng
* @brief Print Error-level diag logs.
* @param [in] id log ID (only 0 is supported now)
* @param [in] fmt the format information of the log
* @param [in] args the parameter list of log (variable number, up to 10)
* @retval ERRCODE_SUCC Success
* @retval Others ERRCODE_FAIL or other error num.
* @else
* @brief Error级别diag日志打印
* @param [in] id 日志ID当前只支持0
* @param [in] fmt 打印输出的格式字符串
* @param [in] args 参数列表最多支持10个参数
* @retval ERRCODE_SUCC 成功返回#ERRCODE_SUCC
* @retval Others 失败返回#ERRCODE_FAIL或其他返回值
* @endif
*/
#define uapi_diag_error_log(id, fmt, args...) uapi_diag_error_logx(id, fmt, ##args)
/**
* @if Eng
* @brief Print Warning-level diag logs.
* @param [in] id log ID (only 0 is supported now)
* @param [in] fmt the format information of the log
* @param [in] args the parameter list of log (variable number, up to 10)
* @retval ERRCODE_SUCC Success
* @retval Others ERRCODE_FAIL or other error num.
* @else
* @brief Warning级别diag日志打印
* @param [in] id 日志ID当前只支持0
* @param [in] fmt 打印输出的格式字符串
* @param [in] args 参数列表最多支持10个参数
* @retval ERRCODE_SUCC 成功返回#ERRCODE_SUCC
* @retval Others 失败返回#ERRCODE_FAIL或其他返回值
* @endif
*/
#define uapi_diag_warning_log(id, fmt, args...) uapi_diag_warning_logx(id, fmt, ##args)
/**
* @if Eng
* @brief Print Info-level diag logs.
* @param [in] id log ID (only 0 is supported now)
* @param [in] fmt the format information of the log
* @param [in] args the parameter list of log (variable number, up to 10)
* @retval ERRCODE_SUCC Success
* @retval Others ERRCODE_FAIL or other error num.
* @else
* @brief Info级别diag日志打印
* @param [in] id 日志ID当前只支持0
* @param [in] fmt 打印输出的格式字符串
* @param [in] args 参数列表最多支持10个参数
* @retval ERRCODE_SUCC 成功返回#ERRCODE_SUCC
* @retval Others 失败返回#ERRCODE_FAIL或其他返回值
* @endif
*/
#define uapi_diag_info_log(id, fmt, args...) uapi_diag_info_logx(id, fmt, ##args)
/**
* @if Eng
* @brief Print Debug-level diag logs.
* @param [in] id log ID (only 0 is supported now)
* @param [in] fmt the format information of the log
* @param [in] args the parameter list of log (variable number, up to 10)
* @retval ERRCODE_SUCC Success
* @retval Others ERRCODE_FAIL or other error num.
* @else
* @brief Debug级别diag日志打印
* @param [in] id 日志ID当前只支持0
* @param [in] fmt 打印输出的格式字符串
* @param [in] args 参数列表最多支持10个参数
* @retval ERRCODE_SUCC 成功返回#ERRCODE_SUCC
* @retval Others 失败返回#ERRCODE_FAIL或其他返回值
* @endif
*/
#define uapi_diag_debug_log(id, fmt, args...) uapi_diag_debug_logx(id, fmt, ##args)
/**
* @}
*/
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif /* DIAG_LOG_H */