mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-28 01:58:11 -07:00
Merge branch 'ofw-dev' into xfw-dev
This commit is contained in:
@@ -221,7 +221,12 @@ void cli_command_log(Cli* cli, FuriString* args, void* context) {
|
||||
furi_log_level_to_string(furi_log_get_level(), ¤t_level);
|
||||
printf("Current log level: %s\r\n", current_level);
|
||||
|
||||
furi_hal_console_set_tx_callback(cli_command_log_tx_callback, ring);
|
||||
FuriLogHandler log_handler = {
|
||||
.callback = cli_command_log_tx_callback,
|
||||
.context = ring,
|
||||
};
|
||||
|
||||
furi_log_add_handler(log_handler);
|
||||
|
||||
printf("Use <log ?> to list available log levels\r\n");
|
||||
printf("Press CTRL+C to stop...\r\n");
|
||||
@@ -230,7 +235,7 @@ void cli_command_log(Cli* cli, FuriString* args, void* context) {
|
||||
cli_write(cli, buffer, ret);
|
||||
}
|
||||
|
||||
furi_hal_console_set_tx_callback(NULL, NULL);
|
||||
furi_log_remove_handler(log_handler);
|
||||
|
||||
if(restore_log_level) {
|
||||
// There will be strange behaviour if log level is set from settings while log command is running
|
||||
|
||||
Reference in New Issue
Block a user