This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/master by this push:
new fb16ef3 LOG4J2-2977 Replace outdated PatternLayout.createLayout()
calls in docs with createDefaultLayout(). (#453)
fb16ef3 is described below
commit fb16ef372d64104d570b407968fb6778e814fc97
Author: Ron Grabowski <[email protected]>
AuthorDate: Wed Feb 3 09:47:13 2021 -0500
LOG4J2-2977 Replace outdated PatternLayout.createLayout() calls in docs
with createDefaultLayout(). (#453)
---
src/site/asciidoc/manual/customconfig.adoc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/site/asciidoc/manual/customconfig.adoc
b/src/site/asciidoc/manual/customconfig.adoc
index 7f4c9ea..502f781 100644
--- a/src/site/asciidoc/manual/customconfig.adoc
+++ b/src/site/asciidoc/manual/customconfig.adoc
@@ -274,8 +274,7 @@ public class MyXMLConfiguration extends XMLConfiguration {
protected void doConfigure() {
super.doConfigure();
final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
- final Layout layout =
PatternLayout.createLayout(PatternLayout.SIMPLE_CONVERSION_PATTERN, config,
null,
- null,null, null);
+ final Layout layout = PatternLayout.createDefaultLayout(config);
final Appender appender =
FileAppender.createAppender("target/test.log", "false", "false", "File", "true",
"false", "false", "4000", layout, null, "false", null, config);
appender.start();
@@ -314,8 +313,7 @@ Appender to the current configuration.
----
final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
final Configuration config = ctx.getConfiguration();
- Layout layout =
PatternLayout.createLayout(PatternLayout.SIMPLE_CONVERSION_PATTERN, config,
null,
- null,null, null);
+ Layout layout = PatternLayout.createDefaultLayout(config);
Appender appender = FileAppender.createAppender("target/test.log",
"false", "false", "File", "true",
"false", "false", "4000", layout, null, "false", null, config);
appender.start();