mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-08 14:43:04 +08:00
Merge pull request #4251 from Lawlieta/chenyong
[ulog] Add backend filtering interface, add async log output control interface, ulog mutex change to semaphore
This commit is contained in:
3 files changed
+133
-53
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -24,6 +24,7 @@ extern "C" {
|
||||
* ulog init and deint
|
||||
*/
|
||||
int ulog_init(void);
|
||||
int ulog_async_init(void);
|
||||
void ulog_deinit(void);
|
||||
|
||||
/*
|
||||
@@ -78,6 +79,7 @@ void ulog_flush(void);
|
||||
* asynchronous output API
|
||||
*/
|
||||
void ulog_async_output(void);
|
||||
void ulog_async_output_enabled(rt_bool_t enabled);
|
||||
void ulog_async_waiting_log(rt_int32_t time);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -201,6 +201,7 @@ struct ulog_backend
|
||||
{
|
||||
char name[RT_NAME_MAX];
|
||||
rt_bool_t support_color;
|
||||
rt_uint32_t out_level;
|
||||
void (*init) (struct ulog_backend *backend);
|
||||
void (*output)(struct ulog_backend *backend, rt_uint32_t level, const char *tag, rt_bool_t is_raw, const char *log, size_t len);
|
||||
void (*flush) (struct ulog_backend *backend);
|
||||
|
||||
Reference in new issue
Block a user