logging: Add frontend support to v2
Extended logging v2 to support frontend api. Contrary to v1, it is possible to have frontend and backends in the system. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
ca217fe189
commit
7c72b78660
12 changed files with 95 additions and 24 deletions
|
@ -60,6 +60,10 @@ LOG_MODULE_REGISTER(log);
|
|||
#define CONFIG_LOG_BUFFER_SIZE 4
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_LOG_TAG_MAX_LEN
|
||||
#define CONFIG_LOG_TAG_MAX_LEN 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_LOG2_ALWAYS_RUNTIME
|
||||
BUILD_ASSERT(!IS_ENABLED(CONFIG_NO_OPTIMIZATIONS),
|
||||
"Option must be enabled when CONFIG_NO_OPTIMIZATIONS is set");
|
||||
|
@ -687,6 +691,10 @@ void z_impl_log_panic(void)
|
|||
*/
|
||||
log_init();
|
||||
|
||||
if (IS_ENABLED(CONFIG_LOG_FRONTEND)) {
|
||||
log_frontend_panic();
|
||||
}
|
||||
|
||||
for (int i = 0; i < log_backend_count_get(); i++) {
|
||||
backend = log_backend_get(i);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue