Deprecated API
Contents
-
Deprecated ClassesClassDescriptionUse
AtomicReference
.UseAtomicReference
.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.with no replacement - no longer used
-
Deprecated FieldsFieldDescriptionOptions are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term.Options are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term.Use
LogLog.DEBUG_KEY
instead.This variable is for internal use only. It will become private in future versions.This variable is for internal use only. It will become package protected in future versions.This variable is for internal use only. It will become private in future versions.This variable is for internal use only. It will become private in future versions.UseLevel.DEBUG
instead.UseLevel.ERROR
instead.UseLevel.FATAL
instead.UseLevel.INFO
instead.UseLevel.WARN
instead.As of 1.2.12, useFilter.getNext()
andFilter.setNext(org.apache.log4j.spi.Filter)
insteadOptions are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term.Options are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term.no longer used, lookups are only used when%m{lookups}
is specifiedDeprecated in 2.7: useNullOutputStream.getInstance()
.
-
Deprecated MethodsMethodDescriptionPlease use
LogManager.exists(String)
instead.Please useLogManager.getCurrentLoggers()
instead.Please useLogManager.getLoggerRepository()
instead.Please useCategory.getLoggerRepository()
instead.Use the setter method for the option directly instead of the genericsetOption
method.Use the setter method for the option directly instead of the genericsetOption
method.as of 1.2.Please useHierarchy.getCurrentLoggers()
instead.Deprecated with no replacement.Deprecated with no replacement.This method will be removed with no replacement.Please use theLevel.toLevel(int)
method instead.Please use theLevel.toLevel(int, Level)
method instead.Please use theLevel.toLevel(String)
method instead.Please use theLevel.toLevel(String, Level)
method instead.We now use JavaBeans introspection to configure components. Options strings are no longer needed.Use the setter method for the option directly instead of the genericsetOption
method.Use getNullAppender instead. getInstance should have been static.We now use JavaBeans introspection to configure components. Options strings are no longer needed.Use the setter method for the option directly instead of the genericsetOption
method.In 2.7, useAbstractManager.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.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()
Not used internally, no replacement. TODO remove and make source final.useLoggerConfig.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.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.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)useCommandLine.Help.synopsis(int)
insteaduseCommandLine.Help.TextTable.textAt(int, int)
insteadorg.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.UseLogger.traceEntry()
instead which performs the same function.UseLogger.traceEntry(String, Object...)
instead which performs the same function.UseLogger.traceExit()
instead which performs the same function.UseLogger.traceExit(Object)
instead which performs the same function.Use the Marker add or set methods to add parent Markers. Will be removed by final GA release.Use the Marker add or set methods to add parent Markers. Will be removed by final GA release.UseProviderUtil.loadProvider(java.net.URL, ClassLoader)
instead. Will be removed in 3.0.
-
Deprecated ConstructorsConstructorDescriptionSince 2.9 Added tempCompressedFilePatternString parameterSince 2.9 Added tempCompressedFilePatternString parameteruse
Log4jLogEvent.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)
.Use constructor ParameterizedMessage(String, Object[], Throwable) instead
-
Deprecated Annotation Type ElementsAnnotation Type ElementDescription