logback / LOGBACK-1559 [Open] Improve subAppend function in OutputStreamAppender
============================== Here's what changed in this issue in the last few minutes. This issue has been created This issue is now assigned to you. View or comment on issue using this link https://jira.qos.ch/browse/LOGBACK-1559 ============================== Issue created ------------------------------ Akshay Patidar created this issue on 26/May/21 10:34 AM Summary: Improve subAppend function in OutputStreamAppender Issue Type: Improvement Assignee: Logback dev list Components: logback-core Created: 26/May/21 10:34 AM Priority: Major Reporter: Akshay Patidar Description: Currently, if we want to write a custom appender on top of OutputStreamAppender we have to override *subAppend(E event)* [code|[https://github.com/qos-ch/logback/blob/master/logback-core/src/main/java/ch/qos/logback/core/OutputStreamAppender.java#L217-L224]] from OutputStreamAppender which is not desirable as then we have to keep track of changes made in the OutputStreamAppender and update our custom appender accordingly. To avoid this we can replace [these|https://github.com/qos-ch/logback/blob/master/logback-core/src/main/java/ch/qos/logback/core/OutputStreamAppender.java#L230-L231] lines with the *writeOut(event)* method. Now if someone wants to extend OutputStreamAppender he can just override *writeOut* method. Also, the *writeBytes* method in OutputStreamAppender is private so we have to copy the function in our appender which is not desirable. (We can make *writeBytes* protected for this) ============================== This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59) _______________________________________________ logback-dev mailing list logback-dev@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-dev