Skip to content
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

Optionally offer stable hashes as interned log IDs #891

Open
jonathanpallant opened this issue Nov 21, 2024 · 1 comment
Open

Optionally offer stable hashes as interned log IDs #891

jonathanpallant opened this issue Nov 21, 2024 · 1 comment

Comments

@jonathanpallant
Copy link
Contributor

Currently we take the address of a symbol as the interned log ID. This is good because it is guaranteed unique across the whole binary (that is the linker's job).

However, if you are combining multiple linked images together (e.g. using Hubris) the IDs are no longer unique.

We should add an optional feature which causes defmt to use the unique discriminator as the interned ID. This will make the log frames larger, but that's why it should be optional.

@teburd
Copy link

teburd commented Nov 22, 2024

I think if you could add an optional unique identifier alongside the existing log id, (e.g. some build specific identifier) this would solve all the cases noted before.

  • multiple images have a way of identifying perhaps which images the message comes from
  • rebuilds could create unique image identifiers, e.g. based on a timestamp/hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants