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 (Created) (JIRA)" <ji...@apache.org> on 2011/10/19 15:30:10 UTC

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

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


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

        

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

Posted by "Florian Semm (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Semm updated LOG4PHP-160:
---------------------------------

    Attachment: defaultLayout.patch

- a default-layout will be set in the constructor
- add tests to LoggerAppender
- modified LoggerConfigurator/tests of LoggerConfigurator

                
> 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

        

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

Posted by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

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

Posted by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159206#comment-13159206 ] 

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

Cool. I'll have a look at it and apply it to trunk when I get a bit of free time.
                
> 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

        

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

Posted by "Florian Semm (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13162426#comment-13162426 ] 

Florian Semm commented on LOG4PHP-160:
--------------------------------------

well i don't know which default-layout is the best for each appender. i thought a "simple" layout fits for all appenders.


i don't know why i have removed the check....and you are right. ignore this part of the patch.
                
> 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

        

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

Posted by "Ivan Habunek (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Habunek resolved LOG4PHP-160.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2

Thanks for the work, the issue is resolved now.
                
> 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
>             Fix For: 2.2
>
>         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

        

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

Posted by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13162397#comment-13162397 ] 

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

I meant to write "The patch mostly looks good", but lost "patch" along the way. :)
                
> 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