mirror of
https://github.com/hmaxnl/DotBased.git
synced 2025-01-18 10:04:20 +01:00
[CHANGE] Get msgTemplate
This commit is contained in:
parent
737cbcfd11
commit
448d85d6f6
|
@ -23,11 +23,15 @@ public class BasedLogger : Microsoft.Extensions.Logging.ILogger
|
|||
private LogCapsule ConstructCapsule<TState>(LogSeverity severity, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
|
||||
{
|
||||
//TODO: Extract parameters & format
|
||||
var msgTemplate = string.Empty;
|
||||
if (state is IEnumerable<KeyValuePair<string, object>> stateEnum)
|
||||
{
|
||||
foreach (var prop in stateEnum)
|
||||
{
|
||||
|
||||
if (prop is { Key: "{OriginalFormat}", Value: string propValueString })
|
||||
{
|
||||
msgTemplate = propValueString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user