[JIRA] Created: (LBCORE-56) AppenderBase getLayout returns null

AppenderBase getLayout returns null ----------------------------------- Key: LBCORE-56 URL: http://jira.qos.ch/browse/LBCORE-56 Project: logback-core Issue Type: Bug Components: Appender Affects Versions: 0.9.9 Environment: Linux Reporter: Thilo Tanner Assignee: Logback dev list Priority: Minor AppenderBase getter and setter for layout aren't abstract. Because the setter drops any value and the getter returns null, overriding the class can be very cumbersome, if you don't hav access to the source code of AppenderBase. Please make the methods abstract or introduce a layout member. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-56?page=com.atlassian.jira.plugin.system.is... ] Ceki Gulcu commented on LBCORE-56: ---------------------------------- Hello Thilo, Why do you say that sub-classing AppenderBase can be cumbersome because of the layout getter/setter? While I agree that that you have to remember to override the setter/getter for layout of your subclass has a layout, but if it doesn't have a layout you don't have to do anything. Nevertheless, I agree that the way the setter/getter in AppenderBase is implemented can be confusing or event error prone.
AppenderBase getLayout returns null -----------------------------------
Key: LBCORE-56 URL: http://jira.qos.ch/browse/LBCORE-56 Project: logback-core Issue Type: Bug Components: Appender Affects Versions: 0.9.9 Environment: Linux Reporter: Thilo Tanner Assignee: Logback dev list Priority: Minor
AppenderBase getter and setter for layout aren't abstract. Because the setter drops any value and the getter returns null, overriding the class can be very cumbersome, if you don't hav access to the source code of AppenderBase. Please make the methods abstract or introduce a layout member.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-56?page=com.atlassian.jira.plugin.system.is... ] Ceki Gulcu edited comment on LBCORE-56 at 10/18/08 9:58 PM: ------------------------------------------------------------ Hello Thilo, Why do you say that sub-classing AppenderBase can be cumbersome because of the layout getter/setter? While I agree that that you have to remember to override the setter/getter for layout of your subclass has a layout, but if it doesn't have a layout you don't have to do anything. Nevertheless, I agree that the way the setter/getter in AppenderBase is implemented can be confusing or even error prone. was (Author: noreply.ceki@qos.ch): Hello Thilo, Why do you say that sub-classing AppenderBase can be cumbersome because of the layout getter/setter? While I agree that that you have to remember to override the setter/getter for layout of your subclass has a layout, but if it doesn't have a layout you don't have to do anything. Nevertheless, I agree that the way the setter/getter in AppenderBase is implemented can be confusing or event error prone.
AppenderBase getLayout returns null -----------------------------------
Key: LBCORE-56 URL: http://jira.qos.ch/browse/LBCORE-56 Project: logback-core Issue Type: Bug Components: Appender Affects Versions: 0.9.9 Environment: Linux Reporter: Thilo Tanner Assignee: Logback dev list Priority: Minor
AppenderBase getter and setter for layout aren't abstract. Because the setter drops any value and the getter returns null, overriding the class can be very cumbersome, if you don't hav access to the source code of AppenderBase. Please make the methods abstract or introduce a layout member.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-56?page=com.atlassian.jira.plugin.system.is... ] Ceki Gulcu resolved LBCORE-56. ------------------------------ Resolution: Won't Fix Hello Thilo, There pros and cons to various approachec. An abstract setter/getter for layout would make it more obvious that these two methods need to be implemented by each appender, on the con side, existing appenders not using a layout need to be modified. Frankly speaking, I expect developers wishing to implement their own appenders to look at the code. The justification is too subtle to merit change. Leaving the code as is.
AppenderBase getLayout returns null -----------------------------------
Key: LBCORE-56 URL: http://jira.qos.ch/browse/LBCORE-56 Project: logback-core Issue Type: Bug Components: Appender Affects Versions: 0.9.9 Environment: Linux Reporter: Thilo Tanner Assignee: Ceki Gulcu Priority: Minor
AppenderBase getter and setter for layout aren't abstract. Because the setter drops any value and the getter returns null, overriding the class can be very cumbersome, if you don't hav access to the source code of AppenderBase. Please make the methods abstract or introduce a layout member.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-56?page=com.atlassian.jira.plugin.system.is... ] Ceki Gulcu closed LBCORE-56. ----------------------------
AppenderBase getLayout returns null -----------------------------------
Key: LBCORE-56 URL: http://jira.qos.ch/browse/LBCORE-56 Project: logback-core Issue Type: Bug Components: Appender Affects Versions: 0.9.9 Environment: Linux Reporter: Thilo Tanner Assignee: Ceki Gulcu Priority: Minor
AppenderBase getter and setter for layout aren't abstract. Because the setter drops any value and the getter returns null, overriding the class can be very cumbersome, if you don't hav access to the source code of AppenderBase. Please make the methods abstract or introduce a layout member.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (2)
-
Ceki Gulcu (JIRA)
-
Thilo Tanner (JIRA)