microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
733a37f2b7310e6fd954187427f2af0e713dc286

Branches

Tags

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

Clone

HTTPS

Download ZIP

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

20lines · modepreview

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

using Microsoft.Extensions.Logging;

namespace Microsoft.Teams.Extensions.Logging;

public static class LogLevelExtensions
{
    public static Common.Logging.LogLevel ToTeams(this LogLevel level)
    {
        return level switch
        {
            LogLevel.Information => Common.Logging.LogLevel.Info,
            LogLevel.Warning => Common.Logging.LogLevel.Warn,
            LogLevel.Error or LogLevel.Critical => Common.Logging.LogLevel.Error,
            _ => Common.Logging.LogLevel.Debug
        };
    }
}