Pages for logged out editors learn more
uint8_t UART_TxBuf[50]; #define LogLocal(...) do{}while(HAL_UART_Transmit_DMA(&huart1,UART_TxBuf,sprintf((char *)UART_TxBuf,__VA_ARGS__)))
Use
LogLocal("I2c Error\r\n");