You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/21 05:05:00 UTC

[jira] [Work logged] (LOG4J2-1571) Example of extending Appenders tries to extend from final class OutputStreamAppender

     [ https://issues.apache.org/jira/browse/LOG4J2-1571?focusedWorklogId=168172&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-168172 ]

ASF GitHub Bot logged work on LOG4J2-1571:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Nov/18 05:04
            Start Date: 21/Nov/18 05:04
    Worklog Time Spent: 10m 
      Work Description: rgoers closed pull request #217: [LOG4J2-1571] Fixed Appenders section in Extending Log4j
URL: https://github.com/apache/logging-log4j2/pull/217
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/site/asciidoc/manual/extending.adoc b/src/site/asciidoc/manual/extending.adoc
index db5a6f9229..6634ddc2bc 100644
--- a/src/site/asciidoc/manual/extending.adoc
+++ b/src/site/asciidoc/manual/extending.adoc
@@ -354,10 +354,14 @@ pause while the reconfiguration takes place.
 [source,java]
 ----
 @Plugin(name = "Stub", category = "Core", elementType = "appender", printObject = true)
-public final class StubAppender extends OutputStreamAppender {
-
-    private StubAppender(String name, Layout layout, Filter filter, StubManager manager,
-                         boolean ignoreExceptions) {
+public final class StubAppender extends AbstractOutputStreamAppender<StubManager> {
+
+    private StubAppender(String name,
+                         Layout<? extends Serializable> layout,
+                         Filter filter,
+                         boolean ignoreExceptions,
+                         StubManager  manager) {
+        super(name, layout, filter, ignoreExceptions, true, manager);
     }
 
     @PluginFactory
@@ -378,7 +382,7 @@ public final class StubAppender extends OutputStreamAppender {
         if (layout == null) {
             layout = PatternLayout.createDefaultLayout();
         }
-        return new StubAppender(name, layout, filter, manager, ignoreExceptions);
+        return new StubAppender(name, layout, filter, ignoreExceptions, manager);
     }
 }
 ----


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 168172)
            Time Spent: 10m
    Remaining Estimate: 0h

> Example of extending Appenders tries to extend from final class OutputStreamAppender
> ------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1571
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1571
>             Project: Log4j 2
>          Issue Type: Documentation
>          Components: Documentation
>    Affects Versions: 2.0
>            Reporter: Adam A. Koch
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> On the page https://logging.apache.org/log4j/2.0/manual/extending.html#Appenders the code example StubAppender extends from OutputStreamAppender but that class is final and cannot be extended. A better example would be great!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)