Skip to content

[kept for history for now] Move to plain SLF4J - #8320

Draft
rmannibucau wants to merge 4 commits into
apache:mainfrom
rmannibucau:dev/slf4j
Draft

rmannibucau wants to merge 4 commits into
apache:mainfrom
rmannibucau:dev/slf4j

Conversation

@rmannibucau

@rmannibucau rmannibucau commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Overall idea is to move to a real logger implementation, there are multiple pitfalls with current manual buffering/filewriter:

  • it is not very customizable (structured logging is hard to do for example)
  • it requires to use /dev/null as workaround when in a docker container and enable stdout/stderr
  • it is not extensible with common appenders easily even with slf4j listener - kafka my friend to cite it ;)
  • it is not easy to auto-instrument (opentelemetry-javaagent or k8s integrations for ex, slf4j is built-in, not custom integrations)
  • there is no real notion of MDC or future work on observability

edit: issue ref: #8321


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.
  • [-] Mention the appropriate issue in your description (for example: addresses #123), if applicable.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

…output format

- Back LogChannel on SLF4J through a HopLogBuffer log4j2 appender that feeds
  the in-memory LoggingBuffer and the console (FixedWidthLogLayout).
- Replace the old FileWriter mechanics (LogChannelFileWriter, LogChannelFileWriterBuffer,
  FileLoggingEventListener) with a single HopFileAppender.
- Send bare message text to SLF4J and keep the layout-side subject/level/timestamp
  decoration so UI and console output match the previous slf4j-free format.
@bamaer

bamaer commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Please create tickets for your PRs so we can keep a trace of changes. The initial review showed some significant issues, I can post the full review tomorrow.
More importantly, imho major changes like these should be discussed in a feature request ticket or a discussion first. A PR is not the right place to have this discussion.

…event key-values and expose the accurate call-site via the caller boundary
…e hot-path logging cost, and document the design
…th a deque instead of ArrayList.remove(0)
@hansva
hansva marked this pull request as draft September 15, 2026 09:11
@rmannibucau rmannibucau changed the title Move to plain SLF4J [kept for history for now] Move to plain SLF4J Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants