Repository navigation
Description
Why this issue exists
The _F-suffixed logging macros (FL_WARN_F, FL_ERROR_F, FL_PRINT_F, the FL_LOG_<CHANNEL>_F family, and the FL_LOG_<CHANNEL>_ASYNC_MAIN_F family) were introduced very recently in #3190 (merged 2026-06-16) when stream-form callers were being migrated to printf style. Three days later, #3272 / #3273 (merged 2026-06-19) unified the stream- and printf-style entry points so that FL_WARN(...) accepts both forms via macro-level argument-count dispatch. The _F aliases were preserved only as a transitional fig leaf and now exist as one-line passthroughs to their non-_F counterparts.
There is no remaining reason to keep them:
- They are not "legacy" — they shipped three days before they became redundant.
- Every
_Fcall site can be converted to the non-_Fform via a single sed-style rename; no semantics change. - Keeping them doubles the public macro surface (
FL_WARN+FL_WARN_F,FL_ERROR+FL_ERROR_F,FL_PRINT+FL_PRINT_F, plus 7FL_LOG_*_Fand 7FL_LOG_*_ASYNC_MAIN_F) for zero benefit. - New contributors picking between
FL_WARNandFL_WARN_Fget no signal from naming about which to use, and the lint checker inci/lint_cpp/legacy_log_macro_checker.pywould need extra rules to steer them away from_F.
Scope
Source removal (src/fl/log/log.h):
- Delete
#define FL_WARN_F(...) FL_WARN(__VA_ARGS__)and its_F_IF,_F_ONCE,_F_EVERYsiblings. - Delete
#define FL_ERROR_F(...)andFL_ERROR_F_IF(...). - Delete
#define FL_PRINT_F(...)andFL_PRINT_F_EVERY(...). - Delete
#define FL_LOG_SPI_F(...),FL_LOG_RMT_F(...),FL_LOG_PARLIO_F(...),FL_LOG_AUDIO_F(...),FL_LOG_INTERRUPT_F(...),FL_LOG_FLEXIO_F(...),FL_LOG_OBJECTFLED_F(...). - Delete the corresponding
FL_LOG_*_ASYNC_MAIN_F(...)macros. - Delete the no-op (
FASTLED_LOG_VERBOSITY=0) branches for all of the above. - Delete
FL_LOG_ASYNC_F(...).
Call-site rewrite:
| Old | New |
|---|---|
FL_WARN_F(fmt, args) |
FL_WARN(fmt, args) |
FL_ERROR_F(fmt, args) |
FL_ERROR(fmt, args) |
FL_PRINT_F(fmt, args) |
FL_PRINT(fmt, args) |
FL_WARN_F_IF(cond, fmt, args) |
FL_WARN_IF(cond, fmt, args) |
FL_WARN_F_ONCE(fmt, args) |
FL_WARN_ONCE(fmt, args) |
FL_WARN_F_EVERY(ms, fmt, args) |
FL_WARN_EVERY(ms, fmt, args) |
FL_ERROR_F_IF(cond, fmt, args) |
FL_ERROR_IF(cond, fmt, args) |
FL_PRINT_F_EVERY(ms, fmt, args) |
FL_PRINT_EVERY(ms, fmt, args) |
FL_LOG_SPI_F(fmt, args) |
FL_LOG_SPI(fmt, args) |
FL_LOG_RMT_F(fmt, args) |
FL_LOG_RMT(fmt, args) |
| ... (same pattern for PARLIO, AUDIO, INTERRUPT, FLEXIO, OBJECTFLED) | ... |
FL_LOG_SPI_ASYNC_MAIN_F(fmt, args) |
FL_LOG_SPI_ASYNC_MAIN(fmt, args) |
| ... (same pattern for the other async channels) | ... |
FL_LOG_ASYNC_F(logger, fmt, args) |
FL_LOG_ASYNC(logger, fmt, args) |
Scale: grep FL_WARN_F\s*\(\|FL_ERROR_F\s*\(\|FL_PRINT_F\s*\(\|FL_LOG_\w*_F\s*\(\|FL_LOG_\w*_ASYNC_MAIN_F\s*\( across src/ reports ~1,544 occurrences across 197 files. The largest contributors are the RMT5/Parlio drivers; the rewrite is mechanical (one-pass sed/script + spot-check on stream-form preservation).
Lint update (ci/lint_cpp/legacy_log_macro_checker.py): add a check that flags any newly-introduced FL_*_F\( to prevent regressions.
Tests (tests/fl/log/log.hpp): drop the FL_WARN_F alias still compiles / FL_ERROR_F alias still compiles / FL_PRINT_F alias still compiles subcases that #3273 added. The unified entry-point tests already cover both stream- and printf-style.
Risk
Low. Mechanical rename; the unified macros have been on master since #3273 merged so any in-flight branches calling FL_WARN_F will get a compile error pointing them at FL_WARN. No public API change for users who follow the documented entry points (FastLED.warn(...) etc. are unaffected — this issue scopes purely to the FL_*_F internal macros).
Acceptance
- All
FL_*_Fmacros removed fromsrc/fl/log/log.h. - All call sites in
src/,tests/,examples/rewritten to the non-_Fform. - Linter updated to block re-introduction.
-
bash test --cpppasses. -
bash lintclean. - No mention of the
_Fsuffix remains anywhere in the repo except this issue and the historical PR descriptions of Migrate logging macros to printf style #3190 / refactor(log): unify FL_WARN/FL_WARN_F via argument-count dispatch (#3272) #3273.
Cross-references
- Introduced: Migrate logging macros to printf style #3190
- Unification that made it redundant: refactor(log): unify FL_WARN/FL_WARN_F via overload dispatch (drop the _F suffix family) #3272 / refactor(log): unify FL_WARN/FL_WARN_F via argument-count dispatch (#3272) #3273 (refactor(log): unify FL_WARN/FL_WARN_F via argument-count dispatch (#3272) #3273 merged 2026-06-19)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Jun 27, 2026
Closing as deferred. The cleanup is correctly scoped (delete all
FL_*_Faliases + sed-sweep ~1559 call sites to non-_Fform), but the substitution is dangerous in a mixed session: the same sed pattern that updates call sites also rewrites the macro#definelines themselves into self-referential expansions (#define FL_WARN(...) FL_WARN(__VA_ARGS__)), producing compile errors that aren't always caught early. Verified empirically this session.To re-open as a focused PR, the safe ordering is:
_F#definelines fromsrc/fl/log/log.h(so the sed sweep doesn't see them).src/ examples/ tests/(excludinglog.h).FL_*_Freferences inci/lint_cpp/legacy_log_macro_checker.pyif any exist.Tracked at meta level under #3023 / closed-#3344. Re-open as a dedicated PR when there's a focused session for it.
(Note:
FL_DBG_Fis intentionally not in scope of this cleanup -- it's the only_Fvariant with semantically distinct format-style behavior on Low-memory targets where the non-_Fform drops args entirely.)