Serilog EcsTextFormatter: Not what I expected

This c# code...

class Program
    static void Main(string[] args)
        Log.Logger = new LoggerConfiguration()
            .WriteTo.Console(new EcsTextFormatter())
        var user = new Elastic.CommonSchema.User
            Id = "111",
            Name = "test"
        Log.Information("{@user}", user);

...puts the 'user' object under '_metadata'. I would have though that because I used an Elastic.CommonSchema.User object, it would have come out at the top level. What am I missing?

Heya @sgtobin. To help out anyone else with a similar question in future, I thought I'd link to our discussion about this on the GitHub issue:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.