Ejemplo n.º 1
0
 static Program()
 {
     // Setup a pre-logger to have a place to write out diagnostics and errors until
     // we have a chance to properly setup the final runtime logging configuration
     _logger = StartupLogger.CreateLogger <Program>();
     _logger.LogInformation("********** Commencing STARTUP LOGGING **********");
 }
Ejemplo n.º 2
0
        public Startup(IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            // Start with a pre-logger till the final
            // logging config is finalized down below
            _logger = StartupLogger.CreateLogger <Startup>();

            // This is ugly as hell but unfortunately, we could not find another
            // way to pass this along from Program to other parts of the app via DI
            var args = Program.CommandLineArgs?.ToArray();

            _logger.LogInformation("Resolving final runtime configuration");
            _config = ResolveAppConfig(args);

            // TODO: We may need to adjust based on changes in .NET 2.0
            ConfigureLogging(env, loggerFactory);
        }