Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-580

ArgumentOutOfRangeException - When logger name begins with character '.'

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: 1.2.11
    • Fix Version/s: 1.2.12
    • Component/s: Core
    • Labels:
      None
    • Flags:
      Important

      Description

      When you try to get a logger and supply a name which begins with the '.' character for example ".Test" the code crashes in : at log4net.Repository.Hierarchy.Hierarchy.UpdateParents(Logger log)

      System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
      Parameter name: startIndex
      at System.String.LastIndexOf(Char value, Int32 startIndex, Int32 count)
      at log4net.Repository.Hierarchy.Hierarchy.UpdateParents(Logger log)
      at log4net.Repository.Hierarchy.Hierarchy.GetLogger(String name, ILoggerFactory factory)
      at log4net.Repository.Hierarchy.Hierarchy.GetLogger(String name)
      at log4net.Core.LoggerManager.GetLogger(String repository, String name)
      at log4net.LogManager.GetLogger(String repository, String name)

        Attachments

          Activity

            People

            • Assignee:
              nachbarslumpi Dominik Psenner
              Reporter:
              selectplaya Timothy Fuller
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: