There should be an analyzer for this misuse.
Message should be something like:
"Parameter names must match message format arguments."
public static partial class MyLogger
{
[ZLoggerMessage(LogLevel.Information, "Bar: {x}")]
public static partial void Bar(this ILogger<Foo> logger, int value);
}