After following these steps you can view messages logged on the OS level. This includes messages logged using FURI_LOG_D (for debug) for example. You can use these in your scripts too:
FURI_LOG_E(): errorFURI_LOG_W(): warningFURI_LOG_I(): infoFURI_LOG_D(): debugFURI_LOG_T(): trace
Make the following change to cli_command_log in applications/cli/cli_commands.c (and of course make and reflash).
void cli_command_log(Cli* cli, string_t args, void* context) {
furi_stdglue_set_global_stdout_callback(cli_stdout_callback);
+ furi_log_set_puts((FuriLogPuts)printf);
printf("Press any key to stop...\r\n");
cli_getc(cli);
furi_stdglue_set_global_stdout_callback(NULL);
+ furi_log_set_puts(furi_hal_console_puts);
}Connect to the Flipper using the serial connection and run log to listen for events. You will see output as follows:
Nothing happening? Try increasing the debug level (Settings > System > Debug Level).
The changes patched the log CLI command to direct Furi (OS) to redirect log messages to printf which then get sent to the console. The second lines undoes the change once the log invocation ends.
