public Program(string username, string password) { // logger factory / adjust to your needs to log to the desired destination var loggerFactory = new LoggerFactory(); loggerFactory.AddConsole(); logger = loggerFactory.CreateLogger <Program>(); // create HTTP client with correct authentication and basic logging logger.LogInformation("Creating http client"); var httpClient = CreateHttpClient(loggerFactory, username, password); // create instance of FOMA SDK logger.LogInformation("Creating foma SDK"); fomaSdk = new FomaClient(httpClient, loggerFactory.CreateLogger <FomaClient>()); }