You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Ron Grabowski (JIRA)" <ji...@apache.org> on 2006/03/17 06:08:14 UTC

[jira] Created: (LOG4NET-69) FormatException thrown when *Format methods are given a malformed format string: log.DebugFormat("Malformed {{,,,5}format{8}!");

FormatException thrown when *Format methods are given a malformed format string: log.DebugFormat("Malformed {{,,,5}format{8}!");
--------------------------------------------------------------------------------------------------------------------------------

         Key: LOG4NET-69
         URL: http://issues.apache.org/jira/browse/LOG4NET-69
     Project: Log4net
        Type: Bug
    Versions: 1.2.9, 1.2.10, v.Next    
    Reporter: Ron Grabowski
    Priority: Critical


This statement:

 log.DebugFormat("Malformed {{,,,5}format{8}!");

throw 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (LOG4NET-69) Exception thrown when *Format methods are given a malformed format string

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-69?page=all ]

Nicko Cadell updated LOG4NET-69:
--------------------------------

        Summary: Exception thrown when *Format methods are given a malformed format string  (was: FormatException thrown when *Format methods are given a malformed format string: log.DebugFormat("Malformed {{,,,5}format{8}!");)
    Description: 
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.  

  was:
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.  


Reduced length of summary as it formats better in the release notes

> Exception thrown when *Format methods are given a malformed format string
> -------------------------------------------------------------------------
>
>          Key: LOG4NET-69
>          URL: http://issues.apache.org/jira/browse/LOG4NET-69
>      Project: Log4net
>         Type: Bug
>     Versions: 1.2.9
>     Reporter: Ron Grabowski
>     Assignee: Nicko Cadell
>     Priority: Critical

>
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (LOG4NET-69) FormatException thrown when *Format methods are given a malformed format string: log.DebugFormat("Malformed {{,,,5}format{8}!");

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-69?page=all ]

Nicko Cadell reassigned LOG4NET-69:
-----------------------------------

    Assign To: Nicko Cadell

> FormatException thrown when *Format methods are given a malformed format string: log.DebugFormat("Malformed {{,,,5}format{8}!");
> --------------------------------------------------------------------------------------------------------------------------------
>
>          Key: LOG4NET-69
>          URL: http://issues.apache.org/jira/browse/LOG4NET-69
>      Project: Log4net
>         Type: Bug
>     Versions: 1.2.9, 1.2.10, v.Next
>     Reporter: Ron Grabowski
>     Assignee: Nicko Cadell
>     Priority: Critical

>
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (LOG4NET-69) Exception thrown when *Format methods are given a malformed format string

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-69?page=all ]
     
Nicko Cadell resolved LOG4NET-69:
---------------------------------

    Fix Version: 1.2.10
     Resolution: Fixed

This is fixed and i have added a test to ensure that malformed format strings don't leak exceptions.

> Exception thrown when *Format methods are given a malformed format string
> -------------------------------------------------------------------------
>
>          Key: LOG4NET-69
>          URL: http://issues.apache.org/jira/browse/LOG4NET-69
>      Project: Log4net
>         Type: Bug
>     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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (LOG4NET-69) Exception thrown when *Format methods are given a malformed format string

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-69?page=all ]

Nicko Cadell updated LOG4NET-69:
--------------------------------

    Version:     (was: 1.2.10)
                 (was: v.Next)

version 1.2.10 does not actualy exist yet so this issue does not affect it. The issue exists in the latest source code at present but should hopefully be fixed shortly.

> Exception thrown when *Format methods are given a malformed format string
> -------------------------------------------------------------------------
>
>          Key: LOG4NET-69
>          URL: http://issues.apache.org/jira/browse/LOG4NET-69
>      Project: Log4net
>         Type: Bug
>     Versions: 1.2.9
>     Reporter: Ron Grabowski
>     Assignee: Nicko Cadell
>     Priority: Critical

>
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (LOG4NET-69) FormatException thrown when *Format methods are given a malformed format string: log.DebugFormat("Malformed {{,,,5}format{8}!");

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-69?page=all ]

Ron Grabowski updated LOG4NET-69:
---------------------------------

    Description: 
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.  

  was:
This statement:

 log.DebugFormat("Malformed {{,,,5}format{8}!");

throw 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.  


> FormatException thrown when *Format methods are given a malformed format string: log.DebugFormat("Malformed {{,,,5}format{8}!");
> --------------------------------------------------------------------------------------------------------------------------------
>
>          Key: LOG4NET-69
>          URL: http://issues.apache.org/jira/browse/LOG4NET-69
>      Project: Log4net
>         Type: Bug
>     Versions: 1.2.9, 1.2.10, v.Next
>     Reporter: Ron Grabowski
>     Priority: Critical

>
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira