I've configured nlog to write logs to database, giving host for connection string from appsettings.json using config layout drawer. But there are some log calls inside Startup.ConfigureServices and Startup.Configure. So, when the configuration is not ready, nlog in this moment tries to write to database. It takes empty host (config is still not ready!), and in the nlog's own log file I see the error of failed logging because of empty host.
So, the question: is it the way not to log to database target utill the config will be ready?