OpenSim-NGC / OpenSim-Tranquillity

OpenSim Core ++. Provides Bug Fixes and some new ideas that enhance the reliability and performance of OpenSim Core Yeti.
Other
23 stars 13 forks source link

Remove references to log4net #76

Closed Misterblue closed 5 months ago

Misterblue commented 5 months ago

More of converting log4net to Microsoft.Extensions.Logging. Added a reference to the IServiceProvider into OpenSimServer which is the base class created by each of the services. In the individual modules, I've added a private static ILogger? m_logger to replace the static initialization with log4net. Then created a logger instance in the constructor/initializer so the classes begin with a m_logger ??= OpenSimServer.Instance.ServiceProvider.GetRequiredService<ILogger>(); Then replaced all the references to m_log to m_logger and the proper method So, if the individual class is ever DI'ed, that initial assignment would be replaced with the logger passed in by DI.