You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ron Grabowski (Jira)" <ji...@apache.org> on 2020/12/28 19:35:00 UTC

[jira] [Comment Edited] (LOG4J2-2977) Documentation for code to create a FileAppender is out of date

    [ https://issues.apache.org/jira/browse/LOG4J2-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17255330#comment-17255330 ] 

Ron Grabowski edited comment on LOG4J2-2977 at 12/28/20, 7:34 PM:
------------------------------------------------------------------

Looks like the simplest fix would be to change the example from:

{code:java}
Layout layout = PatternLayout.createLayout(PatternLayout.SIMPLE_CONVERSION_PATTERN, config, null, null,null, null); 
{code}

to:

{code:java}
Layout layout = PatternLayout.createDefaultLayout(config)
{code}

based on:

[https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java#L431]

I'm trying to get back into log4j2 development. Assigning ticket to myself but it may take a couple weeks to understand how to get this changed. Looks like this file needs updated:

https://github.com/apache/logging-log4j2/blob/master/src/site/asciidoc/manual/customconfig.adoc


was (Author: rgrabowski):
Looks like the simplest fix would be to change the example from:

{code:java}
Layout layout = PatternLayout.createLayout(PatternLayout.SIMPLE_CONVERSION_PATTERN, config, null,            null,null, null); 
{code}

to:

{code:java}
Layout layout = PatternLayout.createDefaultLayout(config)
{code}

based on:

[https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java#L431]

I'm trying to get back into log4j2 development. Assigning ticket to myself but it may take a couple weeks to understand how to get this changed. Looks like this file needs updated:

https://github.com/apache/logging-log4j2/blob/master/src/site/asciidoc/manual/customconfig.adoc

> Documentation for code to create a FileAppender is out of date
> --------------------------------------------------------------
>
>                 Key: LOG4J2-2977
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2977
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.13.3
>         Environment: Please update the documentation with code that successfully can create a FileAppender
>            Reporter: Bryan Pauquette
>            Assignee: Ron Grabowski
>            Priority: Minor
>         Attachments: image-2020-12-14-09-23-04-411.png
>
>
> [http://logging.apache.org/log4j/2.x/manual/customconfig.html#AddingToCurrent]
>  
> Appears to be out of date because the createLayout method is no longer available. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)