Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfRangeException when creating child loggers multithreaded #197

Closed
FreeAndNil opened this issue Oct 18, 2024 · 0 comments · Fixed by #198
Closed

IndexOutOfRangeException when creating child loggers multithreaded #197

FreeAndNil opened this issue Oct 18, 2024 · 0 comments · Fixed by #198
Assignees
Milestone

Comments

@FreeAndNil
Copy link
Contributor

When creating many loggers in different threads an there is no parent logger (yet), you will get an IndexOutOfRangeException with 3.0 upwards.

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Collections.Generic.List`1.Add(T item)
   at log4net.Repository.Hierarchy.Hierarchy.UpdateParents(Logger log)
   at log4net.Repository.Hierarchy.Hierarchy.TryCreateLogger(LoggerKey key, ILoggerFactory factory)
   at log4net.Repository.Hierarchy.Hierarchy.GetLogger(String name, ILoggerFactory factory)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant