1 2 3 4 5 6 7
using Microsoft.Extensions.Logging; class Foo { private readonly ILogger _logger; void Bar() { _logger.LogInformation("User logged in"); } }