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
Is it something that can be done on the default ToString method of the ZLogger's state object to render the message?
The immediate not a solution that works is to generetate log methods that logs Enumerable values using LoggerMessageAttribute instead of ZLoggerMessage
The text was updated successfully, but these errors were encountered:
When using zlogger's source generator and using the resulting code with another LoggerProvider (OpenTelemetry Exporter for my case)
the default ToString of the state object is called to generate the logging message:
public override string ToString() => $"MyItems: {Items}";
Where Items parameter is of type IEnumerable
Here is the ZLoggerMessage call:
Here is the resulting message formatted in the end
By comparison, the LoggerMessageAttribute from Microsoft calls the following methods on the value:
Previous code found here : https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogValuesFormatter.cs#L253
Is it something that can be done on the default ToString method of the ZLogger's state object to render the message?
The immediate not a solution that works is to generetate log methods that logs Enumerable values using LoggerMessageAttribute instead of ZLoggerMessage
The text was updated successfully, but these errors were encountered: