-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce IBufferedLogRecordMetadata
- Loading branch information
Martin Taillefer
committed
Jun 6, 2024
1 parent
0afe5e1
commit cf89cdd
Showing
5 changed files
with
142 additions
and
12 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/libraries/Microsoft.Extensions.Logging.Abstractions/src/IBufferedLogRecordMetadata.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Diagnostics; | ||
|
||
namespace Microsoft.Extensions.Logging | ||
{ | ||
/// <summary> | ||
/// Holds metadata for a buffered log record. | ||
/// </summary> | ||
/// <remarks> | ||
/// If the logging infrastructure decides to buffer log records in memory, it will ensure that the | ||
/// <c>TState</c> value delivered to logging providers implements this interface. The logging providers | ||
/// can then use the metadata to augment the log records they emit. | ||
/// </remarks> | ||
public interface IBufferedLogRecordMetadata | ||
{ | ||
/// <summary> | ||
/// Gets the time when the log record was recorded. | ||
/// </summary> | ||
public DateTimeOffset? CreationTime { get; } | ||
|
||
/// <summary> | ||
/// Gets the ID of the thread that created the log record. | ||
/// </summary> | ||
public int? ManagedThreadId { get; } | ||
|
||
/// <summary> | ||
/// Gets the ID of the span in effect when the log record was created. | ||
/// </summary> | ||
public ActivitySpanId? SpanId { get; } | ||
|
||
/// <summary> | ||
/// Gets the ID of the trace in effect when the log record was created. | ||
/// </summary> | ||
public ActivityTraceId? TraceId { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters