Return-Path: X-Original-To: apmail-logging-log4net-dev-archive@www.apache.org Delivered-To: apmail-logging-log4net-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 C8895CF75 for ; Mon, 21 May 2012 09:27:46 +0000 (UTC) Received: (qmail 95457 invoked by uid 500); 21 May 2012 09:27:46 -0000 Delivered-To: apmail-logging-log4net-dev-archive@logging.apache.org Received: (qmail 95146 invoked by uid 500); 21 May 2012 09:27:44 -0000 Mailing-List: contact log4net-dev-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET Dev" List-Id: Delivered-To: mailing list log4net-dev@logging.apache.org Received: (qmail 94758 invoked by uid 99); 21 May 2012 09:27:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2012 09:27:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 8B6E6141887 for ; Mon, 21 May 2012 09:27:42 +0000 (UTC) Date: Mon, 21 May 2012 09:27:42 +0000 (UTC) From: "Dominik Psenner (JIRA)" To: log4net-dev@logging.apache.org Message-ID: <1204631672.2775.1337592462575.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1926011500.2447.1337579140863.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Comment Edited] (LOG4NET-340) Exception during StringFormat: Input string was not in a correct format. 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/LOG4NET-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13280050#comment-13280050 ] Dominik Psenner edited comment on LOG4NET-340 at 5/21/12 9:26 AM: ------------------------------------------------------------------ This is actually not a bug. The string you pass in contains a "{", which in turn is passed on to the string.Format() method that raises a StringFormatException because it cannot format "{\n[..]". You will have to escape every "{" and "}" with "{{" and "}}" if you do want that those are processed by the string.Format() method. was (Author: nachbarslumpi): This is actually not a bug. The string you pass in contains a "{", which in turn is passed on to the string.Format() method that raises a StringFormatException because it cannot format "{\n[..]". You will have to escape every "{" and "}" with "{{" and "}}" if you want to view it in the logfiles as it is. > Exception during StringFormat: Input string was not in a correct format. > ------------------------------------------------------------------------- > > Key: LOG4NET-340 > URL: https://issues.apache.org/jira/browse/LOG4NET-340 > Project: Log4net > Issue Type: Bug > Affects Versions: 1.2.10 > Reporter: Deepak Kumar Bhatt > > We are encountering following error when we use following debugger statement in code. This request is a JSON request which is a valid format in JSON but still log4net 1.2.10.0 logs this message. > <<>> > Logger.Debugger("request=" + request); > <<>> > Exception during StringFormat: Input string was not in a correct format. request={ > "ID": "xxxx-xxxxx-xxxx-xxxx-xxxx", > "zipFile": "Test.docx__04052012105400.authoring.gz", > "actualFile": "Test02052012222046.docx", > "UserID": "bhatt", > "groupID": "GroupA", > "groupFromUI": "GroupA" > }{} -- 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