NetCoreWebDriverFactory  3.0.0
Easy WebDriver generation for .NET Core
AlexanderOnTest.NetCoreWebDriverFactory.Logging.LogProviders.LogMessageFormatter Class Reference

Static Public Member Functions

static Func< string > SimulateStructuredLogging (Func< string > messageBuilder, object[] formatParameters)
 Some logging frameworks support structured logging, such as serilog. This will allow you to add names to structured data in a format string: For example: Log("Log message to {user}", user). This only works with serilog, but as the user of LibLog, you don't know if serilog is actually used. So, this class simulates that. it will replace any text in {curly braces} with an index number. "Log {message} to {user}" would turn into => "Log {0} to {1}". Then the format parameters are handled using regular .net string.Format. More...
 
static string FormatStructuredMessage (string targetMessage, object[] formatParameters, out IEnumerable< string > patternMatches)
 

Member Function Documentation

◆ SimulateStructuredLogging()

static Func<string> AlexanderOnTest.NetCoreWebDriverFactory.Logging.LogProviders.LogMessageFormatter.SimulateStructuredLogging ( Func< string >  messageBuilder,
object []  formatParameters 
)
static

Some logging frameworks support structured logging, such as serilog. This will allow you to add names to structured data in a format string: For example: Log("Log message to {user}", user). This only works with serilog, but as the user of LibLog, you don't know if serilog is actually used. So, this class simulates that. it will replace any text in {curly braces} with an index number. "Log {message} to {user}" would turn into => "Log {0} to {1}". Then the format parameters are handled using regular .net string.Format.

Parameters
messageBuilderThe message builder.
formatParametersThe format parameters.
Returns

The documentation for this class was generated from the following file: