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 "Maxime Faye (JIRA)" <ji...@apache.org> on 2010/04/16 11:07:25 UTC

[jira] Created: (LOG4PHP-111) Problem using a custom ConversionPattern

Problem using a custom ConversionPattern
----------------------------------------

                 Key: LOG4PHP-111
                 URL: https://issues.apache.org/jira/browse/LOG4PHP-111
             Project: Log4php
          Issue Type: Bug
          Components: Code
    Affects Versions: 2.0
         Environment: Windows 7 32-bits, PHP5.3.0, Apache 2.2.11
            Reporter: Maxime Faye
            Priority: Minor


When using this layout in a XML config file :
<layout class="LoggerLayoutPattern">
            <param name="ConversionPattern" value="%d{d/m/Y H:i:s,u} [%t] [%p] : %m" />
</layout>

Logged messages carret doesn't go to the next line, generating this kind of log file :
09/04/2010 17:39:51,056 [4088] [INFO] : Admin [8 | maxime@edencast.com] logged to the administration12/04/2010 12:14:19,940 [3668] [INFO] : Admin [1 | admin@edencast.com] logged to the administration12/04/2010 12:15:24,582 [3668] [INFO] : Admin [1 | admin@edencast.com] validated comments ids : [18]12/04/2010 12:16:09,875 [3668] [INFO] : Admin [1 | admin@edencast.com] validated comments ids : [16]15/04/2010 11:35:55,697 [2112] [INFO] : Admin [8 | maxime@edencast.com] logged to the administration15/04/2010 11:38:42,501 [2112] [INFO] : Admin [1 | admin@edencast.com] logged to the administration16/04/2010 09:51:30,161 [2112] [INFO] : Admin [8 | maxime@edencast.com] logged to the administration16/04/2010 09:52:09,751 [2112] [INFO] : Admin [1 | admin@edencast.com] logged to the administration

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

        

[jira] Resolved: (LOG4PHP-111) Problem using a custom ConversionPattern

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

Christian Grobmeier resolved LOG4PHP-111.
-----------------------------------------

    Fix Version/s: 2.1
       Resolution: Fixed

Thanks Ivan!

I have added a note on the appender-layout documentation on that

> Problem using a custom ConversionPattern
> ----------------------------------------
>
>                 Key: LOG4PHP-111
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-111
>             Project: Log4php
>          Issue Type: Bug
>          Components: Code
>    Affects Versions: 2.0
>         Environment: Windows 7 32-bits, PHP5.3.0, Apache 2.2.11
>            Reporter: Maxime Faye
>            Priority: Minor
>             Fix For: 2.1
>
>
> When using this layout in a XML config file :
> <layout class="LoggerLayoutPattern">
>             <param name="ConversionPattern" value="%d{d/m/Y H:i:s,u} [%t] [%p] : %m" />
> </layout>
> Logged messages carret doesn't go to the next line, generating this kind of log file :
> 09/04/2010 17:39:51,056 [4088] [INFO] : Admin [8 | maxime@edencast.com] logged to the administration12/04/2010 12:14:19,940 [3668] [INFO] : Admin [1 | admin@edencast.com] logged to the administration12/04/2010 12:15:24,582 [3668] [INFO] : Admin [1 | admin@edencast.com] validated comments ids : [18]12/04/2010 12:16:09,875 [3668] [INFO] : Admin [1 | admin@edencast.com] validated comments ids : [16]15/04/2010 11:35:55,697 [2112] [INFO] : Admin [8 | maxime@edencast.com] logged to the administration15/04/2010 11:38:42,501 [2112] [INFO] : Admin [1 | admin@edencast.com] logged to the administration16/04/2010 09:51:30,161 [2112] [INFO] : Admin [8 | maxime@edencast.com] logged to the administration16/04/2010 09:52:09,751 [2112] [INFO] : Admin [1 | admin@edencast.com] logged to the administration

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LOG4PHP-111) Problem using a custom ConversionPattern

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

Ivan Habunek commented on LOG4PHP-111:
--------------------------------------

You need to add %n to the end of your conversion pattern, like this:

<param name="ConversionPattern" value="%d{d/m/Y H:i:s,u} [%t] [%p] : %m%n" /> 

I figured this looking at the examples, but I can't find it in the docs. This may be a documentation issue.
http://logging.apache.org/log4php/apidocs/log4php/layouts/LoggerLayoutPattern.html

> Problem using a custom ConversionPattern
> ----------------------------------------
>
>                 Key: LOG4PHP-111
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-111
>             Project: Log4php
>          Issue Type: Bug
>          Components: Code
>    Affects Versions: 2.0
>         Environment: Windows 7 32-bits, PHP5.3.0, Apache 2.2.11
>            Reporter: Maxime Faye
>            Priority: Minor
>
> When using this layout in a XML config file :
> <layout class="LoggerLayoutPattern">
>             <param name="ConversionPattern" value="%d{d/m/Y H:i:s,u} [%t] [%p] : %m" />
> </layout>
> Logged messages carret doesn't go to the next line, generating this kind of log file :
> 09/04/2010 17:39:51,056 [4088] [INFO] : Admin [8 | maxime@edencast.com] logged to the administration12/04/2010 12:14:19,940 [3668] [INFO] : Admin [1 | admin@edencast.com] logged to the administration12/04/2010 12:15:24,582 [3668] [INFO] : Admin [1 | admin@edencast.com] validated comments ids : [18]12/04/2010 12:16:09,875 [3668] [INFO] : Admin [1 | admin@edencast.com] validated comments ids : [16]15/04/2010 11:35:55,697 [2112] [INFO] : Admin [8 | maxime@edencast.com] logged to the administration15/04/2010 11:38:42,501 [2112] [INFO] : Admin [1 | admin@edencast.com] logged to the administration16/04/2010 09:51:30,161 [2112] [INFO] : Admin [8 | maxime@edencast.com] logged to the administration16/04/2010 09:52:09,751 [2112] [INFO] : Admin [1 | admin@edencast.com] logged to the administration

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.