using Robust.Shared.IoC; using Robust.Shared.Log; namespace Robust.UnitTesting { /// /// Helpers for setting up IoC in tests. /// public static class IocExt { /// /// Registers the log manager with test log handler to a dependency collection. /// /// Dependency collection to register into. /// Prefix for the test log output. public static void RegisterLogs(this IDependencyCollection deps, string? prefix = null) { deps.Register(() => { var log = new LogManager(); log.RootSawmill.AddHandler(new TestLogHandler(prefix)); return log; }); } } }