@@ -29,15 +29,22 @@ public Startup(IHostingEnvironment env)
2929 StackifyLib . Utils . StackifyAPILogger . OnLogMessage += StackifyAPILogger_OnLogMessage ;
3030 StackifyLib . Utils . StackifyAPILogger . LogEnabled = true ;
3131
32- var builder = new ConfigurationBuilder ( )
32+ /* var builder = new ConfigurationBuilder()
3333 .SetBasePath(env.ContentRootPath)
3434 .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
3535 .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
3636 .AddEnvironmentVariables();
3737 Configuration = builder.Build();
3838 Configuration.ConfigureStackifyLogging();
3939
40- StackifyLib . Config . Environment = env . EnvironmentName ;
40+ StackifyLib.Config.Environment = env.EnvironmentName;*/
41+
42+ string filePath = "C:\\ Source\\ stackify-api-dotnet\\ samples\\ CoreWebApp\\ Stackify.json" ;
43+
44+ Config . ReadStackifyJSONConfig ( filePath ) ;
45+ Debug . WriteLine ( StackifyLib . Config . AppName ) ;
46+ Debug . WriteLine ( StackifyLib . Config . Environment ) ;
47+ Debug . WriteLine ( StackifyLib . Config . ApiKey ) ;
4148 }
4249
4350 private void StackifyAPILogger_OnLogMessage ( string data )
@@ -82,9 +89,8 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
8289 // var path = Path.Combine(Directory.GetCurrentDirectory(), "nlog.config");
8390 // NLog.LogManager.Configuration = new XmlLoggingConfiguration(path, true);
8491 // app.AddNLogWeb();
85- app . ConfigureStackifyLogging ( Configuration ) ;
86-
87-
92+ //app.ConfigureStackifyLogging(Configuration);
93+
8894 app . UseMvc ( ) ;
8995 }
9096 }
0 commit comments