|
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) |
|
◆ 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
-
messageBuilder | The message builder. |
formatParameters | The format parameters. |
- Returns
The documentation for this class was generated from the following file:
- AlexanderOnTest.NetCoreWebDriverFactory/obj/Debug/netstandard2.0/NuGet/7B06F825144E498C2A8C450136AC36779C6EC729/LibLog/5.0.6/LogProviders/LogMessageFormatter.cs