Skip to content

Early log panic does not print logs #12851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nordic-krch opened this issue Jan 30, 2019 · 0 comments · Fixed by #12871
Closed

Early log panic does not print logs #12851

nordic-krch opened this issue Jan 30, 2019 · 0 comments · Fixed by #12871
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@nordic-krch
Copy link
Collaborator

Describe the bug
When log_panic is triggered early,before log thread starts, no logs can be printed because logger backends are initialized in the logger thread.

To Reproduce
Modified hello_world:

#include <zephyr.h>
#include <misc/printk.h>
#include <logging/log.h>
LOG_MODULE_REGISTER(app);
void main(void)
{
	LOG_INF("test");
	k_panic();
	printk("Hello World! %s\n", CONFIG_BOARD);
}

Expected behavior
On uart console test log entry should be seen followed by kernel panic report.

Impact
Early failures are hard to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant