Im trying to use ILogger the following way,
_logger.LogInformation("Logging info {someClass}", someClass);
But the output is just the object name.
What am I doing wrong here ?
Im trying to use ILogger the following way,
_logger.LogInformation("Logging info {someClass}", someClass);
But the output is just the object name.
What am I doing wrong here ?
You probably like to destruct the class into properties.
That is opt-in, and can be enabled by using the @
So
_logger.LogInformation("Logging info {@someClass}", someClass);
See also: How to use structured logging and the Message templates specs