Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2A3D9200B5C for ; Wed, 27 Jul 2016 23:29:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 29085160A90; Wed, 27 Jul 2016 21:29:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 76A35160A6F for ; Wed, 27 Jul 2016 23:29:21 +0200 (CEST) Received: (qmail 85517 invoked by uid 500); 27 Jul 2016 21:29:20 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 85505 invoked by uid 99); 27 Jul 2016 21:29:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2016 21:29:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 744652C0059 for ; Wed, 27 Jul 2016 21:29:20 +0000 (UTC) Date: Wed, 27 Jul 2016 21:29:20 +0000 (UTC) From: "Anthony Baldocchi (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LOG4J2-1485) File size parsing is inconsistent and unnecessarily restrictive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 27 Jul 2016 21:29:22 -0000 [ https://issues.apache.org/jira/browse/LOG4J2-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anthony Baldocchi updated LOG4J2-1485: -------------------------------------- Description: 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. was: 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) > 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 > > 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