Skip to content

Log Files still not stored in Virtual Folders #9261

Description

@enkelmedia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/staleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions