logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Santry (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4NET-69) Exception thrown when *Format methods are given a malformed format string
Date Fri, 23 Sep 2011 11:34:27 GMT

    [ https://issues.apache.org/jira/browse/LOG4NET-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113344#comment-13113344
] 

Colin Santry commented on LOG4NET-69:
-------------------------------------

Hi,

If getting the same issue, I'm using v1.2.10! I have just downloaded the 1.2.10 version today
(23-Sep-2011).

<log4net.Error>Exception during StringFormat: Input string was not in a correct format.
<format>Reading config! User:{0} Domain:(1}</format><args>{test1, test2}</args></log4net.Error>

Source line:
log.DebugFormat("Reading config!\nUser:{0}\nDomain:(2}", "test1", "test2");

Is 1.2.10 the latest? according to SourceForge the latest is v1.2.0-beta8 ?!

Regards,
Colin


> Exception thrown when *Format methods are given a malformed format string
> -------------------------------------------------------------------------
>
>                 Key: LOG4NET-69
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-69
>             Project: Log4net
>          Issue Type: Bug
>    Affects Versions: 1.2.9
>            Reporter: Ron Grabowski
>            Assignee: Nicko Cadell
>            Priority: Critical
>             Fix For: 1.2.10
>
>
> FormatException thrown when *Format methods are given a malformed format string: log.DebugFormat("Malformed
{{,,,5}format{8}!");
> This statement:
>  log.DebugFormat("Malformed {{,,,5}format{8}!");
> throws the following exception:
> [FormatException: Input string was not in a correct format.]
>    System.Text.StringBuilder.FormatError()
>    System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[]
args)
>    System.String.Format(IFormatProvider provider, String format, Object[] args)
>    log4net.Core.LogImpl.DebugFormat(String format, Object[] args)
> which is consistent with the documentation for String.Format:
> System.FormatException: The format item in format is invalid.  -or- The number indicating
an argument to format is less than zero, or greater than or equal to the number of specified
objects to format.  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message