Browse Source

【主线待合】调整日志级别

master
Lizongdi 15 hours ago
parent
commit
98a1a102e6
  1. 2
      RBcore/msg_center.c
  2. 8
      library/common/rd_mempool.c

2
RBcore/msg_center.c

@ -207,9 +207,11 @@ int MsgCenter_Send(const Msg_t *pstMsg)
{ {
// 发送信号量,通知有新消息 // 发送信号量,通知有新消息
Rd_SemPost(&g_astModules[iDstIndex].stSem, __func__, NULL); Rd_SemPost(&g_astModules[iDstIndex].stSem, __func__, NULL);
log_d("send success send ID:%x to %d", pstMsg->m_uiMsgID, pstMsg->m_uiDstModule);
return RD_SUCCESS; return RD_SUCCESS;
} }
log_w("failed queue full send ID:%x to %d", pstMsg->m_uiMsgID, pstMsg->m_uiDstModule);
return RD_FAILURE; // 队列满 return RD_FAILURE; // 队列满
} }

8
library/common/rd_mempool.c

@ -217,7 +217,7 @@ WEAK void Rd_MemDoInit(void)
(void)Rd_MutexInit(&g_pool_mutex); (void)Rd_MutexInit(&g_pool_mutex);
#endif #endif
log_d("MemPool Init Success: Total %d Bytes", MEM_POOL_TOTAL_SIZE); log_e("MemPool Init Success: Total %d Bytes", MEM_POOL_TOTAL_SIZE);
} }
WEAK void Rd_MemDoDeinit(void) WEAK void Rd_MemDoDeinit(void)
@ -296,7 +296,7 @@ WEAK void* Rd_MemPoolMalloc(size_t size)
} }
if (pvReturn == NULL) if (pvReturn == NULL)
{ {
log_d("MemPool Malloc Failed: Request %zu, No Block Found", size); log_e("MemPool Malloc Failed: Request %zu, No Block Found", size);
} }
} }
#ifdef USE_FREERTOS #ifdef USE_FREERTOS
@ -309,7 +309,7 @@ WEAK void Rd_MemPoolFree(void* ptr)
{ {
if (!is_valid_ptr(ptr)) if (!is_valid_ptr(ptr))
{ {
log_d("MemPool Free Error: Invalid Pointer %p", ptr); log_e("MemPool Free Error: Invalid Pointer %p", ptr);
return; return;
} }
@ -322,7 +322,7 @@ WEAK void Rd_MemPoolFree(void* ptr)
// 双重释放保护 // 双重释放保护
if (block->is_free) if (block->is_free)
{ {
log_d("MemPool Free Error: Double Free detected at %p", ptr); log_e("MemPool Free Error: Double Free detected at %p", ptr);
return; return;
} }

Loading…
Cancel
Save