LogValuesFormatter Class

Formatter to convert the named format items like {NamedformatItem} to string.Format format.

Namespace
Microsoft.Extensions.Logging.Internal
Assemblies
  • Microsoft.Extensions.Logging.Abstractions

Syntax

public class LogValuesFormatter
class Microsoft.Extensions.Logging.Internal.LogValuesFormatter

Constructors

LogValuesFormatter(System.String)
public LogValuesFormatter(string format)

Methods

Format(System.Object[])
Return type:System.String
public string Format(object[] values)
GetValue(System.Object[], System.Int32)
Return type:System.Collections.Generic.KeyValuePair<System.String>
public KeyValuePair<string, object> GetValue(object[] values, int index)
GetValues(System.Object[])
Return type:System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String>>
public IEnumerable<KeyValuePair<string, object>> GetValues(object[] values)

Properties

Microsoft.Extensions.Logging.Internal.LogValuesFormatter.OriginalFormat
Return type:System.String
public string OriginalFormat { get; }
Microsoft.Extensions.Logging.Internal.LogValuesFormatter.ValueNames
Return type:System.Collections.Generic.List<System.String>
public List<string> ValueNames { get; }