logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Tchikine (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4NET-343) ArgumentOutOfRangeException in log4net hierarchy on "." logger name
Date Tue, 29 May 2012 04:55:22 GMT

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

Dmitri Tchikine edited comment on LOG4NET-343 at 5/29/12 4:54 AM:
------------------------------------------------------------------

The actual test case was that this code does not throw any exception:
  log4net.LogManager.GetLogger(".");

But of cause, there are more test cases:
 1) Any of these calls should not through exceptions either:
      log4net.LogManager.GetLogger("..A");
      log4net.LogManager.GetLogger("B....A");
 2) And it should be possible to configure a logger with one character name, and use it, so
that a code like this would actually log a message:
      log4net.LogManager.GetLogger("A").Info("test");

I am afraid that a fix, which simply ignores 1-character strings, does not meet such expectations.

      
                
      was (Author: dmitri):
    The actual test case was that this code does not throw any exception:
                  
> ArgumentOutOfRangeException in log4net hierarchy on "." logger name
> -------------------------------------------------------------------
>
>                 Key: LOG4NET-343
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-343
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.11
>         Environment: Windows 32 bit, .NET 3.5 SP 1
>            Reporter: Dmitri Tchikine
>            Assignee: Dominik Psenner
>            Priority: Minor
>         Attachments: LOG4NET-343.patch
>
>
> While configuring a logger with name ".", however wrong it may be, I stampled on uncaught
exception.
> "Index was out of range. Must be non-negative and less than the size of the collection.
> Parameter name: startIndex"
> The problem code is at the first executable code line of UpdateParents(Logger log) method
> of log4net.Repository.Hierarchy.Hierarchy class.
> I am sure there is an easy fix.

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

        

Mime
View raw message