I am working on an mvc 6 application and I am currently implementing logging. I'm having trouble figuring out the correct way to load a logging config file from my Startup.cs class. Is Server.MapPath
available, or something similar?
Thanks
Edit -
I am able to get the correct path using the following -
var path = appEnvironment.ApplicationBasePath;
var myLoggerConfig = new FileInfo(path + "\\myLogger.config");
Is that the correct way to access a config file the root application?
Here's an example from the MusicStore sample https://github.com/aspnet/MusicStore/blob/dev/src/MusicStore/Startup.cs#L23-L33