You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2016/07/28 23:41:20 UTC
[jira] [Comment Edited] (LOG4J2-1485) File size parsing is
inconsistent and unnecessarily restrictive
[ https://issues.apache.org/jira/browse/LOG4J2-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15398431#comment-15398431 ]
Gary Gregory edited comment on LOG4J2-1485 at 7/28/16 11:41 PM:
----------------------------------------------------------------
Hello [~abaldocchi]:
Thank you for your patches.
Unfortunately we cannot use {{optionconverter-revised.patch}} since there is no Apache License header for the new file.
Would you be willing to resubmit with the Apache header for {{OptionConverterTest.java}}?
Thank you,
Gary
was (Author: garydgregory):
Hello [~abaldocchi]:
Thank you for your patches.
Unfortunately we cannot use {{optionconverter-revised.patch}} since there is no Apache License header for the new file.
Would you be willing to resubmit with the Apache header for OptionConverterTest.java?
Thank you,
Gary
> File size parsing is inconsistent and unnecessarily restrictive
> ---------------------------------------------------------------
>
> Key: LOG4J2-1485
> URL: https://issues.apache.org/jira/browse/LOG4J2-1485
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.6.2
> Reporter: Anthony Baldocchi
> Priority: Minor
> Attachments: optionconverter-revised.patch, optionconverter.patch
>
>
> There are (as far as I've encountered) 2 ways to parse a size from String:
> FileSize.parse(final String string, final long defaultValue)
> OptionConverter.toFileSize(final String value, final long defaultValue)
> These two implementations are not consistent with each other:
> FileSize.parse() when passed in a floating point value will silently truncate the floating point portion to the lower long.
> OptionConverter.toFileSize() when passed in a floating point value will log an error to the StatusLogger and return the defaultValue.
> Neither option supports units larger than GB, though multi-TB disks are common.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org