Skip to content

core/log: add optional log unit prefix#21606

Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom
derMihai:mir/log_unit
Jul 24, 2025
Merged

core/log: add optional log unit prefix#21606
benpicco merged 1 commit intoRIOT-OS:masterfrom
derMihai:mir/log_unit

Conversation

@derMihai
Copy link
Copy Markdown
Contributor

@derMihai derMihai commented Jul 16, 2025

Contribution description

Add optional log unit prefix to logging. You can now:

#define LOG_UNIT "log_unit"
#include "log.h"

...

    LOG_INFO("Hello!\n");

Will print:

log_unit: Hello!

The current behavior is not changed if LOG_UNIT is not defined in a compilation unit.

Testing procedure

I added a small test app and ran it on native and samd20-xpro.

@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: core Area: RIOT kernel. Handle PRs marked with this with care! labels Jul 16, 2025
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 16, 2025
@crasbe crasbe added Type: new feature The issue requests / The PR implemements a new feature for RIOT Process: needs >1 ACK Integration Process: This PR requires more than one ACK labels Jul 16, 2025
@github-actions github-actions bot added the Process: missing approvals Integration Process: PR needs more ACKS (handled by action) label Jul 16, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented Jul 16, 2025

Murdock results

✔️ PASSED

23d0258 core/log: add optional log unit prefix

Success Failures Total Runtime
10560 0 10561 24m:09s

Artifacts

@benpicco benpicco removed the Process: missing approvals Integration Process: PR needs more ACKS (handled by action) label Jul 24, 2025
@benpicco benpicco added this pull request to the merge queue Jul 24, 2025
Merged via the queue into RIOT-OS:master with commit a444a7a Jul 24, 2025
28 of 33 checks passed
@benpicco benpicco added this to the Release 2025.10 milestone Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs >1 ACK Integration Process: This PR requires more than one ACK Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants