![]() |
BSB Developer Docs
|
Log capture service API. More...
#include <stdbool.h>Go to the source code of this file.
Macros | |
| #define | RECORD_LOG_STORAGE "log_storage" |
| The string key for the LogStorage instance access. | |
| #define | LOG_STORAGE_DUMP_DEFAULT_FILE_PATH "/ext/log.txt" |
| Default file path used when log_storage_dump() is called with NULL. | |
Typedefs | |
| typedef struct LogStorage | LogStorage |
| Opaque log storage instance. | |
Functions | |
| bool | log_storage_dump (LogStorage *instance, const char *path) |
| Snapshot the captured log buffer into a file on the /ext partition. | |
| void | log_storage_suspend_remote (LogStorage *instance) |
| Temporarily release the remote log UART. | |
| void | log_storage_resume_remote (LogStorage *instance) |
| Resume remote log reception after log_storage_suspend_remote. | |
Log capture service API.
| #define RECORD_LOG_STORAGE "log_storage" |
The string key for the LogStorage instance access.
Get the instance pointer by calling furi_record_open(RECORD_LOG_STORAGE).
| typedef struct LogStorage LogStorage |
Opaque log storage instance.
Obtain it via furi_record_open(RECORD_LOG_STORAGE).
| bool log_storage_dump | ( | LogStorage * | instance, |
| const char * | path ) |
Snapshot the captured log buffer into a file on the /ext partition.
The complete log lines held in the in-memory circular buffer are written to path. Partial lines are never emitted: a leading fragment left by the buffer wrap-around and a trailing in-progress line are both discarded, so the file contains only whole log lines.
| [in] | instance | pointer to the LogStorage instance |
| [in] | path | destination file path, or NULL to use LOG_STORAGE_DUMP_DEFAULT_FILE_PATH |
| void log_storage_resume_remote | ( | LogStorage * | instance | ) |
Resume remote log reception after log_storage_suspend_remote.
Restores reception only when all outstanding suspends have been resumed; otherwise the line remains released for its current owner.
| [in] | instance | pointer to the LogStorage instance |
| void log_storage_suspend_remote | ( | LogStorage * | instance | ) |
Temporarily release the remote log UART.
Releases the serial line used to receive remote logs so that another consumer can acquire it. Suspends are counted: the line is released on the first call and stays released until every suspend is matched by a log_storage_resume_remote call.
| [in] | instance | pointer to the LogStorage instance |