@@ -44,13 +44,14 @@ typedef uint32_t (*FuriLogTimestamp)(void);
44
44
/** Initialize logging */
45
45
void furi_log_init ();
46
46
47
- /** Log record
48
- *
49
- * @param[in] level The level
50
- * @param[in] format The format
51
- * @param[in] <unnamed> VA args
47
+ /** Print log record
48
+ *
49
+ * @param level
50
+ * @param tag
51
+ * @param format
52
+ * @param ...
52
53
*/
53
- void furi_log_print (FuriLogLevel level , const char * format , ...);
54
+ void furi_log_print_format (FuriLogLevel level , const char * tag , const char * format , ...);
54
55
55
56
/** Set log level
56
57
*
@@ -76,25 +77,22 @@ void furi_log_set_puts(FuriLogPuts puts);
76
77
*/
77
78
void furi_log_set_timestamp (FuriLogTimestamp timestamp );
78
79
79
- #define FURI_LOG_FORMAT (log_letter , tag , format ) \
80
- FURI_LOG_CLR_##log_letter "[" #log_letter "][" tag "]: " FURI_LOG_CLR_RESET format "\r\n"
81
- #define FURI_LOG_SHOW (tag , format , log_level , log_letter , ...) \
82
- furi_log_print(log_level, FURI_LOG_FORMAT(log_letter, tag, format), ##__VA_ARGS__)
83
-
84
80
/** Log methods
85
81
*
86
82
* @param tag The application tag
87
83
* @param format The format
88
84
* @param ... VA Args
89
85
*/
90
86
#define FURI_LOG_E (tag , format , ...) \
91
- FURI_LOG_SHOW(tag, format, FuriLogLevelError, E, ##__VA_ARGS__)
92
- #define FURI_LOG_W (tag , format , ...) FURI_LOG_SHOW(tag, format, FuriLogLevelWarn, W, ##__VA_ARGS__)
93
- #define FURI_LOG_I (tag , format , ...) FURI_LOG_SHOW(tag, format, FuriLogLevelInfo, I, ##__VA_ARGS__)
87
+ furi_log_print_format(FuriLogLevelError, tag, format, ##__VA_ARGS__)
88
+ #define FURI_LOG_W (tag , format , ...) \
89
+ furi_log_print_format(FuriLogLevelWarn, tag, format, ##__VA_ARGS__)
90
+ #define FURI_LOG_I (tag , format , ...) \
91
+ furi_log_print_format(FuriLogLevelInfo, tag, format, ##__VA_ARGS__)
94
92
#define FURI_LOG_D (tag , format , ...) \
95
- FURI_LOG_SHOW(tag, format, FuriLogLevelDebug, D , ##__VA_ARGS__)
93
+ furi_log_print_format(FuriLogLevelDebug, tag, format , ##__VA_ARGS__)
96
94
#define FURI_LOG_T (tag , format , ...) \
97
- FURI_LOG_SHOW(tag, format, FuriLogLevelTrace, T , ##__VA_ARGS__)
95
+ furi_log_print_format(FuriLogLevelTrace, tag, format , ##__VA_ARGS__)
98
96
99
97
#ifdef __cplusplus
100
98
}
0 commit comments