I'm creating new nuget package for one of my class library project called CustomersClient where I have constructor with parameters and one of the parameter is ILogger
public CustomerClient(ILogger<CustomerClient> logger, ICustomerClientOptions options, HttpClient httpClient) { _logger = logger; _options = options; _httpClient = httpClient; }
another constructor without log
public CustomerClient(ICustomerClientOptions options, HttpClient httpClient) { _options = options; _httpClient = httpClient; } public void LogMessage(string msg) { _logger.LogInformation($"{msg}"); }
How do I use logging instance without DI ?