Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E24C2197DC for ; Tue, 5 Apr 2016 17:28:25 +0000 (UTC) Received: (qmail 81187 invoked by uid 500); 5 Apr 2016 17:28:25 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 81137 invoked by uid 500); 5 Apr 2016 17:28:25 -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 81120 invoked by uid 99); 5 Apr 2016 17:28:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2016 17:28:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8635F2C1F60 for ; Tue, 5 Apr 2016 17:28:25 +0000 (UTC) Date: Tue, 5 Apr 2016 17:28:25 +0000 (UTC) From: "Remko Popma (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-1353) Logger 'Object... params' arguments should always be appended even if {} is missing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15226714#comment-15226714 ] Remko Popma commented on LOG4J2-1353: ------------------------------------- It would be very convenient for users to be able to mix the two logging styles without having to specify a MessageFactory though... > Logger 'Object... params' arguments should always be appended even if {} is missing > ----------------------------------------------------------------------------------- > > Key: LOG4J2-1353 > URL: https://issues.apache.org/jira/browse/LOG4J2-1353 > Project: Log4j 2 > Issue Type: New Feature > Components: API > Affects Versions: 2.5 > Reporter: Alex Berg > Priority: Minor > > The Logger.warn/info/trace etc. has methods that take ... object list. It maps into message where {} is given. If there are fewer {} than arguments in list, it ignores argument. Who would ever desire to have an argument ignored? That is to me clearly a bug in the design, but of cause I may be missing something. > I suggest to always append the unmatched extra arguments and separate them by a space or a comma. I'm not sure if the last argument is logged as an exception if it is an exception, in that case the solution should gracefully handle that. > A super nice feature would be if it was possible to configure the append of the unmatched arguments, but I think that is more work than it is worth. > see http://logging.apache.org/log4j/2.x/log4j-api/apidocs/index.html -- 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