M*LIB: non-inlined strings, FuriString primitive (#1795)
* Quicksave 1 * Header stage complete * Source stage complete * Lint & merge fixes * Includes * Documentation step 1 * FBT: output free size considering BT STACK * Documentation step 2 * py lint * Fix music player plugin * unit test stage 1: string allocator, mem, getters, setters, appends, compare, search. * unit test: string equality * unit test: string replace * unit test: string start_with, end_with * unit test: string trim * unit test: utf-8 * Rename * Revert fw_size changes * Simplify CLI backspace handling * Simplify CLI character insert * Merge fixes * Furi: correct filenaming and spelling * Bt: remove furi string include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -25,8 +25,8 @@ void furi_log_init() {
|
||||
void furi_log_print_format(FuriLogLevel level, const char* tag, const char* format, ...) {
|
||||
if(level <= furi_log.log_level &&
|
||||
furi_mutex_acquire(furi_log.mutex, FuriWaitForever) == FuriStatusOk) {
|
||||
string_t string;
|
||||
string_init(string);
|
||||
FuriString* string;
|
||||
string = furi_string_alloc();
|
||||
|
||||
const char* color = FURI_LOG_CLR_RESET;
|
||||
const char* log_letter = " ";
|
||||
@@ -56,23 +56,23 @@ void furi_log_print_format(FuriLogLevel level, const char* tag, const char* form
|
||||
}
|
||||
|
||||
// Timestamp
|
||||
string_printf(
|
||||
furi_string_printf(
|
||||
string,
|
||||
"%lu %s[%s][%s] " FURI_LOG_CLR_RESET,
|
||||
furi_log.timetamp(),
|
||||
color,
|
||||
log_letter,
|
||||
tag);
|
||||
furi_log.puts(string_get_cstr(string));
|
||||
string_reset(string);
|
||||
furi_log.puts(furi_string_get_cstr(string));
|
||||
furi_string_reset(string);
|
||||
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
string_vprintf(string, format, args);
|
||||
furi_string_vprintf(string, format, args);
|
||||
va_end(args);
|
||||
|
||||
furi_log.puts(string_get_cstr(string));
|
||||
string_clear(string);
|
||||
furi_log.puts(furi_string_get_cstr(string));
|
||||
furi_string_free(string);
|
||||
|
||||
furi_log.puts("\r\n");
|
||||
|
||||
|
Reference in New Issue
Block a user