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 "Daniel Wong (Created) (JIRA)" <ji...@apache.org> on 2011/11/23 12:51:40 UTC
[jira] [Created] (LOG4PHP-163) LoggerPatternConverter formats max
incorrectly
LoggerPatternConverter formats max incorrectly
----------------------------------------------
Key: LOG4PHP-163
URL: https://issues.apache.org/jira/browse/LOG4PHP-163
Project: Log4php
Issue Type: Bug
Components: Code
Affects Versions: 2.3
Reporter: Daniel Wong
Priority: Trivial
When formatting using %.10F notation, the number is truncated from the end of string. Rather, it should truncate to the size of $this->max
Propose for line LoggerPatternConverter.php:98
$sbuf .= substr($s, -($this->max), $this->max);
--
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] [Closed] (LOG4PHP-163) LoggerPatternConverter formats max
incorrectly
Posted by "Ivan Habunek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LOG4PHP-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Habunek closed LOG4PHP-163.
--------------------------------
Resolution: Fixed
Done and commited to trunk. Try it out.
> LoggerPatternConverter formats max incorrectly
> ----------------------------------------------
>
> Key: LOG4PHP-163
> URL: https://issues.apache.org/jira/browse/LOG4PHP-163
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Affects Versions: 2.3.0
> Reporter: Daniel Wong
> Assignee: Ivan Habunek
> Priority: Trivial
> Labels: patch
> Fix For: 2.3.0
>
> Attachments: patchfile
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> When formatting using %.10F notation, the number is truncated from the end of string. Rather, it should truncate to the size of $this->max
> Propose for line LoggerPatternConverter.php:98
> $sbuf .= substr($s, -($this->max), $this->max);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (LOG4PHP-163) LoggerPatternConverter formats max
incorrectly
Posted by "Daniel Wong (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LOG4PHP-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Wong updated LOG4PHP-163:
--------------------------------
Attachment: patchfile
> LoggerPatternConverter formats max incorrectly
> ----------------------------------------------
>
> Key: LOG4PHP-163
> URL: https://issues.apache.org/jira/browse/LOG4PHP-163
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Affects Versions: 2.3
> Reporter: Daniel Wong
> Priority: Trivial
> Labels: patch
> Attachments: patchfile
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> When formatting using %.10F notation, the number is truncated from the end of string. Rather, it should truncate to the size of $this->max
> Propose for line LoggerPatternConverter.php:98
> $sbuf .= substr($s, -($this->max), $this->max);
--
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-163) LoggerPatternConverter formats max
incorrectly
Posted by "Ivan Habunek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LOG4PHP-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Habunek updated LOG4PHP-163:
---------------------------------
Fix Version/s: 2.3.0
Assignee: Ivan Habunek
You're right. This should be changed so that it's in sync with printf(). Requires docs to be changed too.
> LoggerPatternConverter formats max incorrectly
> ----------------------------------------------
>
> Key: LOG4PHP-163
> URL: https://issues.apache.org/jira/browse/LOG4PHP-163
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Affects Versions: 2.3.0
> Reporter: Daniel Wong
> Assignee: Ivan Habunek
> Priority: Trivial
> Labels: patch
> Fix For: 2.3.0
>
> Attachments: patchfile
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> When formatting using %.10F notation, the number is truncated from the end of string. Rather, it should truncate to the size of $this->max
> Propose for line LoggerPatternConverter.php:98
> $sbuf .= substr($s, -($this->max), $this->max);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira