microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
dev

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Extensions/Microsoft.Teams.Extensions.Logging/LoggerFactoryExtensions.cs

16lines · modepreview

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Microsoft.Extensions.Logging;
using Microsoft.Teams.Common.Logging;

namespace Microsoft.Teams.Extensions.Logging;

public static class LoggerFactoryExtensions
{
    public static ILoggerFactory AddTeams(this ILoggerFactory factory, Common.Logging.ILogger? logger = null)
    {
        factory.AddProvider(new TeamsLoggerProvider(new TeamsLogger(logger ?? new ConsoleLogger())));
        return factory;
    }
}