log: add log query API endpoints and display logs on web interface
All checks were successful
Build ESP32 BMC Firmware / build (push) Successful in 53s
All checks were successful
Build ESP32 BMC Firmware / build (push) Successful in 53s
This commit is contained in:
42
main/log_handler.h
Normal file
42
main/log_handler.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef LOG_HANDLER_H
|
||||
#define LOG_HANDLER_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "esp_err.h"
|
||||
|
||||
/**
|
||||
* @brief Initialize log handler
|
||||
*
|
||||
* @return esp_err_t ESP_OK on success
|
||||
*/
|
||||
esp_err_t log_handler_init(void);
|
||||
|
||||
/**
|
||||
* @brief Deinitialize log handler
|
||||
*
|
||||
* @return esp_err_t ESP_OK on success
|
||||
*/
|
||||
esp_err_t log_handler_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Get log buffer content
|
||||
*
|
||||
* @param buf Buffer to copy logs into
|
||||
* @param buf_len Length of buffer
|
||||
* @return size_t Number of bytes copied
|
||||
*/
|
||||
size_t log_get_buffer(char *buf, size_t buf_len);
|
||||
|
||||
/**
|
||||
* @brief Clear log buffer
|
||||
*/
|
||||
void log_clear_buffer(void);
|
||||
|
||||
/**
|
||||
* @brief Get current log buffer size
|
||||
*
|
||||
* @return size_t Number of bytes in buffer
|
||||
*/
|
||||
size_t log_get_size(void);
|
||||
|
||||
#endif // LOG_HANDLER_H
|
||||
Reference in New Issue
Block a user