CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
lazy_file_log_sink.h File Reference
#include <stdint.h>
#include "littlefs/lfs.h"
Include dependency graph for lazy_file_log_sink.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void LOG_to_file_lazy (const char filename[], const char msg[])
 Write a log message to an LFS log file.
void LOG_subtask_handle_sync_and_close_of_current_log_file ()
 Flush the current LittleFS log file(s), forcing a write to flash.

Function Documentation

◆ LOG_subtask_handle_sync_and_close_of_current_log_file()

void LOG_subtask_handle_sync_and_close_of_current_log_file ( )

Flush the current LittleFS log file(s), forcing a write to flash.

Note
This function is meant to be called periodically in an RTOS task.
This function can be called very frequently. It tracks its own internal configuration.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LOG_to_file_lazy()

void LOG_to_file_lazy ( const char filename[],
const char msg[] )

Write a log message to an LFS log file.

Parameters
msgThe message to be logged
Note
LFS files are not updated until the file is closed or synced. Syncing is done periodically in the rtos_background_upkeep task.
Here is the call graph for this function:
Here is the caller graph for this function: