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 · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4using Microsoft.Extensions.Logging;
5
6namespace Microsoft.Teams.Extensions.Logging;
7
8public static class LogLevelExtensions
9{
10 public static Common.Logging.LogLevel ToTeams(this LogLevel level)
11 {
12 return level switch
13 {
14 LogLevel.Information => Common.Logging.LogLevel.Info,
15 LogLevel.Warning => Common.Logging.LogLevel.Warn,
16 LogLevel.Error or LogLevel.Critical => Common.Logging.LogLevel.Error,
17 _ => Common.Logging.LogLevel.Debug
18 };
19 }
20}