Asp.Net 5 correct way to access logging config file from Startup.cs

575 views Asked by At

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?

1

There are 1 answers

0
Victor Hurdugaci On