-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-factored context logging by addin an ILoggingContext interface and…
… generalizing the Log extension methods. (#11)
- Loading branch information
Showing
21 changed files
with
207 additions
and
548 deletions.
There are no files selected for viewing
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
30 changes: 30 additions & 0 deletions
30
src/Fluxera.Extensions.Hosting.Abstractions/ILoggingContext.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,30 @@ | ||
namespace Fluxera.Extensions.Hosting | ||
{ | ||
using JetBrains.Annotations; | ||
using Microsoft.Extensions.Logging; | ||
|
||
/// <summary> | ||
/// A contract for a context that provides logging capabilities. | ||
/// </summary> | ||
[PublicAPI] | ||
public interface ILoggingContext<out T> : ILoggingContext | ||
where T : class | ||
{ | ||
/// <summary> | ||
/// Gets the context data, f.e. IServiceCollection. | ||
/// </summary> | ||
internal T LogContextData { get; } | ||
} | ||
|
||
/// <summary> | ||
/// A contract for a context that provides logging capabilities. | ||
/// </summary> | ||
[PublicAPI] | ||
public interface ILoggingContext | ||
{ | ||
/// <summary> | ||
/// Gets a logger. | ||
/// </summary> | ||
ILogger Logger { 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
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
95 changes: 0 additions & 95 deletions
95
src/Fluxera.Extensions.Hosting/ApplicationInitializationContextExtensions.cs
This file was deleted.
Oops, something went wrong.
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
95 changes: 0 additions & 95 deletions
95
src/Fluxera.Extensions.Hosting/ApplicationShutdownContextExtensions.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.