-
ClassDescriptionOnly used internally, will be removed in the next major version.since 2.24.0. A
Duration
converter will be available in 3.0.0.Java Serialization has inherent security weaknesses, see https://www.owasp.org/index.php/Deserialization_of_untrusted_data . Using this layout is no longer recommended. An alternative layout containing the same information isJsonLayout
when configured with properties="true". Deprecated since 2.9.
-
EnumDescriptionThis class is not used anymore and only kept for binary backward compatibility.
-
FieldDescriptionno longer used, lookups are only used when
%m{lookups}
is specifiedsince 2.24.0 useStatusLogger.DEFAULT_STATUS_LISTENER_LEVEL
instead.Deprecated in 2.7: useNullOutputStream.getInstance()
.
-
MethodDescriptionIn 2.7, use
AbstractManager.close()
.useAsyncAppender.Builder
insteadDeprecated in 2.7; useConsoleAppender.newBuilder()
.Deprecated in 2.7; useConsoleAppender.newBuilder()
.since 2.11.0 UseAbstractDatabaseManager.write(LogEvent, Serializable)
.end-of-batch on the event is used instead.end-of-batch on the event is used instead.Use setPassword(char[])since 2.11.0; useNoSqlAppender.Builder
.end-of-batch on the event is used instead.end-of-batch on the event is used instead.In favor ofGzCompressAction.execute(File, File, boolean, int)
.since 2.24.0 useIfLastModified.newBuilder()
instead.since 2.24.0. In 3.0.0 the signature will change.Since 2.9 Usage of Builder API is preferableSince 2.9 Usage of Builder API is preferableend-of-batch on the event is used instead.org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.setEndOfBatch(boolean) end-of-batch on the event is used instead.since 2.7; useRoutes.newBuilder()
.Since 2.7; useRoutingAppender.newBuilder()
UseSmtpAppender.newBuilder()
to create and configure aSmtpAppender.Builder
instance.Deprecated in 2.7; useSocketAppender.newBuilder()
Deprecated in 2.5; useSocketAppender.newBuilder()
This method is ineffective and only kept for binary backward compatibility.Not used internally, no replacement.UseLoggerConfig.Builder.withFilter(Filter)
insteaduseLoggerConfig.getPropertyList()
insteadUsePluginProcessor
instead. To do so, simply includelog4j-core
in your dependencies and make sure annotation processing is not disabled. By default, supported Java compilers will automatically use that plugin processor providedlog4j-core
is on the classpath.UseStatusLogger.getLogger()
and thenAbstractLogger.error(String)
instead.This class is not used anymore and only kept for binary backward compatibility.This method is ineffective and only kept for binary backward compatibility.This method is ineffective and only kept for binary backward compatibility.Since 2.24.0 useContextDataInjector.getValue(java.lang.String)
instead.useMapFilter.getStringMap()
insteaduseLog4jLogEvent.Builder
instead. This method will be removed in an upcoming release.no-opUseGelfLayout.newBuilder()
insteadUseJsonLayout.newBuilder()
insteadUseLevelPatternSelector.newBuilder()
instead.UseMarkerPatternSelector.newBuilder()
instead.UsePatternLayout.newBuilder()
instead. This will be private in a future version.UsePatternLayout.newSerializerBuilder()
instead.Useinstead
Since 2.24.0 useAbstractLayout.Builder.setConfiguration(org.apache.logging.log4j.core.config.Configuration)
instead.UseScriptPatternSelector.newBuilder()
instead.UseXmlLayout.newBuilder()
insteadUseYamlLayout.newBuilder()
insteaduseLogEvent.getContextData()
insteadAs of 2.4, useMainMapLookup.setMainArguments(String[])
Please use theSmtpManager.sendMultipartMessage(MimeMessage, MimeMultipart, String)
method instead.Use createKeyStoreConfiguration(String, char[], String, String)Use getPasswordAsCharArray()Use getPasswordAsCharArray()Use createKeyStoreConfiguration(String, char[], String, String)Use {FastDatePrinter.format(Date)
, {FastDatePrinter.format(Calendar)
, {FastDatePrinter.format(long)
, or {FastDatePrinter.format(Object)
org.apache.logging.log4j.core.util.StringEncoder.encodeIsoChars(CharSequence, int, byte[], int, int) No longer necessary given better performance in Java 8No longer necessary given better performance in Java 8No longer necessary given better performance in Java 8use getConfigurationWatchers.
-
ConstructorDescriptionSince 2.9 Added tempCompressedFilePatternString parameterSince 2.9 Added tempCompressedFilePatternString parameterfor performance reasons since 2.23. Use
JdkMapAdapterStringMap(Map, boolean)
instead.useLog4jLogEvent.Builder
instead. This constructor will be removed in an upcoming release.useLog4jLogEvent.Builder
instead. This constructor will be removed in an upcoming release.useLog4jLogEvent.Builder
instead. This constructor will be removed in an upcoming release.UseGelfLayout.newBuilder()
insteadUseJsonLayout.newBuilder()
insteadUseLevelPatternSelector.newBuilder()
instead. This will be private in a future version.UseMarkerPatternSelector.newBuilder()
instead. This will be private in a future version.UseScriptPatternSelector.newBuilder()
instead. This will be private in a future version.org.apache.logging.log4j.core.layout.XmlLayout(boolean, boolean, boolean, boolean, Charset, boolean) UseXmlLayout.newBuilder()
insteadUseYamlLayout.newBuilder()
insteadUse ThrowablePatternConverter(String name, String stule, String[] options, Configuration config)UseSource(URI)
.
-
Enum ConstantDescriptionThis attribute sets font-weight as "bold" and doesn't set color brightness. Use BOLD if you need to change font-weight and BRIGHT_* to use a bright color.
Duration
instead.