You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Revisit log4j2 Message.getFormat() deprecation for v9 #6377
Log4j 2.24.0 deprecated org.apache.logging.log4j.message.Message.getFormat(), and sentry-log4j2 still calls it to get the unformatted message template. The deprecation warning is suppressed in #5435 (log4j2 2.20.0 → 2.26.1) to keep the build passing under -Xlint:all -Werror.
Call sites: SentryAppender.captureLog (populates the sentry.message.template log attribute) and SentryAppender.createEvent (sets Message.message on events) in sentry-log4j2/src/main/java/io/sentry/log4j2/SentryAppender.java.
The deprecation note points to MultiformatMessage for implementing messages. It does not offer a replacement for reading a message's template, and getFormattedMessage() drops the template.
In 2.26.1 the interface method is a default that returns null. Concrete classes such as ParameterizedMessage, ReusableParameterizedMessage, StringFormattedMessage, MessageFormatMessage and SimpleMessage still override it without a deprecation.
Log4j 3 has only reached 3.0.0-beta3; no stable 3.0 is listed in the Apache release catalog.
Proposed by Nelson Osacky: suppress the warning now and revisit the call in the next major.
Activity
linear-code commentedon Oct 26, 2026
JAVA-800