You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
_logger.WriteTemplate(
TraceType.Information,
"writing {filename} took {milliseconds}ms",
theFileName, theTimeElapsed);
Assuming this would take level, messageTemplate, and params object[] values... Assuming there would be other overloads like InformationTemplate and ErrorTemplate that would call the base one with the enum value. I guess there would be overloads that take an exception also...
The extension method would call the ILogger _logger.Write() with the arguments for object state, Exception eception, Func<object, Exception, string> formatter
The state in this case would implement ILoggerStructure, and ILoggerStructure.GetValues() would enumerate the key-value pairs based on {markers} in the template and values in object[].
The formatter in this case would be a callback that downcasts the state object. Assuming the state object is holding onto the information needed to stringify.
The text was updated successfully, but these errors were encountered:
I cannot resist the temptation as logging is one of my favorite ❤️ topics. So, I will ask 😄
String Interpolation is currently a planned feature for C# 6.0. I wonder how this would look like with string interpolation. I assume it won't effect this as far I can see as the interpolated string seems to be translated to String.Format but I wanted to ask anyway.
Assuming this would take level, messageTemplate, and params object[] values... Assuming there would be other overloads like InformationTemplate and ErrorTemplate that would call the base one with the enum value. I guess there would be overloads that take an exception also...
The extension method would call the ILogger _logger.Write() with the arguments for
object state, Exception eception, Func<object, Exception, string> formatter
The state in this case would implement ILoggerStructure, and ILoggerStructure.GetValues() would enumerate the key-value pairs based on {markers} in the template and values in object[].
The formatter in this case would be a callback that downcasts the state object. Assuming the state object is holding onto the information needed to stringify.
The text was updated successfully, but these errors were encountered: