/// <summary> /// Adds the MongoDB logger to logger hub. /// </summary> /// <param name="hub">logger hub instance.</param> /// <param name="logger">MongoDB logger instance.</param> /// <returns>The logger hub.</returns> private static ILoggerHub AddMongoDB(ILoggerHub hub, IMongoDBLogger logger) { hub.Services.AddSingleton <IMongoDBLogger>(logger); return(hub.AddLogger(logger)); }
/// <summary> /// Adds the console logger to logger hub. /// </summary> /// <param name="hub">logger hub instance.</param> /// <param name="logger">console logger instance.</param> /// <returns>The logger hub.</returns> private static ILoggerHub AddConsole(ILoggerHub hub, IConsoleLogger logger) { hub.Services.AddSingleton <IConsoleLogger>(logger); return(hub.AddLogger(logger)); }