File tree Expand file tree Collapse file tree 3 files changed +237
-161
lines changed
Expand file tree Collapse file tree 3 files changed +237
-161
lines changed Original file line number Diff line number Diff line change 5353
5454 # Initializes the CodeQL tools for scanning.
5555 - name : Initialize CodeQL
56- uses : github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
56+ uses : github/codeql-action/init@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
5757 with :
5858 languages : ${{ matrix.language }}
5959 # If you wish to specify custom queries, you can do so here or in a config file.
8181 run : dotnet build --no-restore -c Release
8282
8383 - name : Perform CodeQL Analysis
84- uses : github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
84+ uses : github/codeql-action/analyze@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+ // See the LICENSE file in the project root for more information.
4+
5+ using Microsoft . Extensions . Logging . Abstractions ;
6+
7+ namespace DevProxy . Logging ;
8+
9+ readonly struct LogEntry
10+ {
11+ public LogLevel LogLevel { get ; init ; }
12+ public string Category { get ; init ; }
13+ public EventId EventId { get ; init ; }
14+ public string ? Message { get ; init ; }
15+ public Exception ? Exception { get ; init ; }
16+
17+ public static LogEntry FromLogEntry < TState > ( LogEntry < TState > logEntry )
18+ {
19+ return new ( )
20+ {
21+ LogLevel = logEntry . LogLevel ,
22+ Category = logEntry . Category ,
23+ EventId = logEntry . EventId ,
24+ Message = logEntry . Formatter ( logEntry . State , logEntry . Exception ) ,
25+ Exception = logEntry . Exception
26+ } ;
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments