microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.Extensions/Microsoft.Teams.Extensions.Logging/LoggerFactoryExtensions.cs
16lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using Microsoft.Extensions.Logging; |
| 5 | using Microsoft.Teams.Common.Logging; |
| 6 | |
| 7 | namespace Microsoft.Teams.Extensions.Logging; |
| 8 | |
| 9 | public static class LoggerFactoryExtensions |
| 10 | { |
| 11 | public static ILoggerFactory AddTeams(this ILoggerFactory factory, Common.Logging.ILogger? logger = null) |
| 12 | { |
| 13 | factory.AddProvider(new TeamsLoggerProvider(new TeamsLogger(logger ?? new ConsoleLogger()))); |
| 14 | return factory; |
| 15 | } |
| 16 | } |