I want to pass a parameter into a method only for the purposes of logging. The parameter is a type of an event that I'm about to process. I can see two approaches to this, and I'm wondering if either of them is more correct?
private void LogEventProcessing<T>()
{
_logger.Information($"Started processing of {typeof(T).Name} event");
}
private void LogEventProcessing(Type type)
{
_logger.Information($"Started processing of {type.Name} event");
}