public IJasperHost BuildHost(StartMode mode) { // SAMPLE: what-the-cli-is-doing // The --log-level flag value overrides your application's // LogLevel if (LogLevelFlag.HasValue) { WebHostBuilder.ConfigureLogging(x => x.SetMinimumLevel(LogLevelFlag.Value)); } if (VerboseFlag) { Console.WriteLine("Verbose flag is on."); // The --verbose flag adds console and // debug logging, as well as setting // the minimum logging level down to debug WebHostBuilder.ConfigureLogging(x => { x.SetMinimumLevel(LogLevel.Debug); x.AddConsole(); x.AddDebug(); }); } // The --environment flag is used to set the environment // property on the IHostedEnvironment within your system if (EnvironmentFlag.IsNotEmpty()) { WebHostBuilder.UseEnvironment(EnvironmentFlag); } // ENDSAMPLE return(mode == StartMode.Full ? WebHostBuilder.StartJasper() : new JasperRuntime(WebHostBuilder.Build())); }