This is a follow up on this issue: #8280
It turns out that even tough we added this
|
Environment.SetEnvironmentVariable("BASEDIR", IOHelper.MapPath("/").TrimEnd("\\"), EnvironmentVariableTarget.Process); |
The IOHelper does not resolve the path using HostingEnvironment.MapPath() for some reason, I'm not sure why but I guess that this is because the logger is created before the HttpContext is fully available. Somewhere around this check:
|
if (useHttpContext && HttpContext.Current != null) |
I'm not really sure but i think that HostingEnvironment.MapPath would work in this context so I don't understand why we have to fallback on the GetRootDirectorySafe, maybe this is to facilitate unit-tests.
I need to investigate a little further but just posting this issue as a "placeholder".
Umbraco-Version: 8.8.0
This is a follow up on this issue: #8280
It turns out that even tough we added this
Umbraco-CMS/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs
Line 30 in bafd058
The IOHelper does not resolve the path using HostingEnvironment.MapPath() for some reason, I'm not sure why but I guess that this is because the logger is created before the HttpContext is fully available. Somewhere around this check:
Umbraco-CMS/src/Umbraco.Core/IO/IOHelper.cs
Line 95 in 069529e
I'm not really sure but i think that HostingEnvironment.MapPath would work in this context so I don't understand why we have to fallback on the GetRootDirectorySafe, maybe this is to facilitate unit-tests.
I need to investigate a little further but just posting this issue as a "placeholder".
Umbraco-Version: 8.8.0