RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

sys/log: make log less special - just 2 modules

Open kfessel opened this issue 3 years ago • 3 comments

Contribution description

this transforms sys/log into two simple modules

this also makes log_write nonstatic for log_color (saving a lot of space in builds) from #18403

Testing procedure

there are log tests all variants

Issues/PRs references

this arose from the discussion in #18403 this also solves #18379

kfessel avatar Aug 09 '22 12:08 kfessel

i moved the doccheck changes to #18431 and added the Kconfig adaption

kfessel avatar Aug 10 '22 13:08 kfessel

log_% should pull in log as a dependency in sys/Makefile.dep, so it also works as long as we still use "legacy" dependencies.

this already is the case in master as this was needed for the pseudomodules as well

https://github.com/RIOT-OS/RIOT/blob/master/sys/Makefile.dep#L399-L402

and unchaged in this PR

https://github.com/kfessel/RIOT/blob/039f1835dd9e002dce03ccd0f7cd8f9fa87feedf/sys/Makefile.dep#L399-L402

kfessel avatar Aug 11 '22 15:08 kfessel

@maribu and @benpicco showed some interest i this PRs predecessors

kfessel avatar Sep 15 '22 13:09 kfessel

Murdock results

:heavy_check_mark: PASSED

e89063e1cf737dfdf69d6105b9345cc318786b49 sys/log_color: guard from compiling for esp

Success Failures Total Runtime
1980 0 1980 06m:37s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

riot-ci avatar Oct 12 '22 10:10 riot-ci

Not having a copy of the log function in every object file is IMO a bugfix.

@leandrolanzieri I'd like to still have this. Please hit merge if you have no objections.

maribu avatar Oct 13 '22 07:10 maribu