-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use Serilog global static logger in v3 (#96)
* Don't use Serilog global static logger in v3 * make logger be internal only
- Loading branch information
1 parent
b7be9b6
commit 7883cd9
Showing
2 changed files
with
4 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
using Serilog; | ||
using Serilog.Core; | ||
|
||
namespace Speckle.Sdk.Logging; | ||
|
||
public static class SpeckleLog | ||
{ | ||
public static ISpeckleLogger Logger => new SpeckleLogger(Serilog.Log.Logger); | ||
internal static Serilog.ILogger SpeckleLogger { get; set; } = Serilog.Core.Logger.None; | ||
public static ISpeckleLogger Logger => new SpeckleLogger(SpeckleLogger); | ||
|
||
public static ISpeckleLogger Create(string name) => | ||
new SpeckleLogger(Log.Logger.ForContext(Constants.SourceContextPropertyName, name)); | ||
new SpeckleLogger(SpeckleLogger.ForContext(Constants.SourceContextPropertyName, name)); | ||
} |