You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org> on 2011/12/04 14:27:39 UTC

[jira] [Commented] (LOG4PHP-160) Appeneders should use a default layout is no layout is specified in configuration

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

Ivan Habunek commented on LOG4PHP-160:
--------------------------------------

The mostly looks good with two changes. 

I decided to add a new method called getDefaultLayout(), which will return LoggerLayoutSimple, but can be overriden by derived appenders. This will be called instead of hard-coding LoggerLayoutSimple as default. The reason for this is that for some appenders, LoggerLayoutSimple makes no sense as default layout. For example, the socket appender which should default to either XML or serialized layout (once LOG4PHP-154 is finished).

I'm not sure why you removed the check "if empty($class)" from LoggerConfigurator and the tests. I think it's still useful. I have skipped that change for the moment.
                
> Appeneders should use a default layout is no layout is specified in configuration
> ---------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-160
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-160
>             Project: Log4php
>          Issue Type: Improvement
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>         Attachments: defaultLayout.patch
>
>
> Currently, if an appender which requires a layout is specified without layout, it will silently fail to log anything.
> e.g.: <appender name="default" class="LoggerAppenderEcho" />
> It would be better if the appender would automatically be configured with a default layout (e.g. LoggerLayoutSimple).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira