|
VT100 Terminal App
Circle VT100 module documentation
|
Provides file-based persistence for Circle logger messages. More...
#include <TFileLog.h>
Public Member Functions | |
| bool | Initialize (CLogger &logger, const char *fileName, CDevice *fallbackTarget) |
| Prepare the log target with logger, file path, and fallback device. | |
| void | SetFallback (CDevice *fallbackTarget) |
| Change the device used when file logging is unavailable. | |
| bool | Start () |
| Attach to the logger and begin capturing output. | |
| void | Stop () |
| Detach from the logger and flush pending output. | |
| int | Write (const void *buffer, size_t count) override |
| Write a chunk of log data and mirror to the fallback if needed. | |
Static Public Member Functions | |
| static CTFileLog * | Get () |
| Access the singleton file log device. | |
Provides file-based persistence for Circle logger messages.
The singleton integrates with CLogger, writes each message to the mounted filesystem using FatFs, and mirrors output to a fallback CDevice whenever the SD card is missing. It manages buffering thresholds and emits a startup banner to aid post-mortem analysis.
|
static |
Access the singleton file log device.
| bool CTFileLog::Initialize | ( | CLogger & | logger, |
| const char * | fileName, | ||
| CDevice * | fallbackTarget | ||
| ) |
Prepare the log target with logger, file path, and fallback device.
| logger | Logger whose output should be mirrored. |
| fileName | Path to the log file on the SD card. |
| fallbackTarget | Device used when file logging is unavailable. |
| void CTFileLog::SetFallback | ( | CDevice * | fallbackTarget | ) |
Change the device used when file logging is unavailable.
| fallbackTarget | Device to receive mirrored log output. |
| bool CTFileLog::Start | ( | ) |
Attach to the logger and begin capturing output.
|
override |
Write a chunk of log data and mirror to the fallback if needed.
| buffer | Pointer to bytes to write. |
| count | Number of bytes in buffer. |