I've tried extending the appenders with the following code and keep getting
errors:
@Plugin(name = "Stub", category = "Core", elementType = "appender",
printObject = true)
2.public final class StubAppender extends OutputStreamAppender {
3.
4. private StubAppender(String name, Layout layout, Filter filter,
StubManager manager,
5. boolean ignoreExceptions) {
6. }
7.
8. @PluginFactory
9. public static StubAppender createAppender(@PluginAttribute("name")
String name,
10.
@PluginAttribute("ignoreExceptions") boolean ignoreExceptions,
11. @PluginElement("Layout")
Layout layout,
12. @PluginElement("Filters")
Filter filter) {
13.
14. if (name == null) {
15. LOGGER.error("No name provided for StubAppender");
16. return null;
17. }
18.
19. StubManager manager = StubManager.getStubManager(name);
20. if (manager == null) {
21. return null;
22. }
23. if (layout == null) {
24. layout = PatternLayout.createDefaultLayout();
25. }
26. return new StubAppender(name, layout, filter, manager,
ignoreExceptions);
27. }
28.}
I got this example from here:
http://logging.apache.org/log4j/2.x/manual/extending.html
It tells me that OutputStreamAppender and LOGGER is not defined.
I'm a little confused on what to do with this issue.
Additonally, I'm not familiar with StubManager and it's implementation, any
insight is GREATLY appreciated.
Thank you,
-Dean
--
View this message in context:
http://apache-logging.6191.n7.nabble.com/Extending-Appenders-tp49160.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]