Git Product home page Git Product logo

Comments (3)

huorswords avatar huorswords commented on July 23, 2024 1

Hello @Iamcerba ,

Thank you very much by all of this information. Will be very helpful to me in the future.

Let's wait then until the Microsoft team fix the issue on ASPNetCore project.

Do you prefer to get this issue open until this or maybe it can be closed?

from microsoft.extensions.logging.log4net.aspnetcore.

Iamcerba avatar Iamcerba commented on July 23, 2024

@huorswords,

Seems it's created in a different location: C:\Program Files\IIS Express\example.log

And it logs in "old" location only if I adjust hosting model by removing

<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>

from csproj.

from microsoft.extensions.logging.log4net.aspnetcore.

Iamcerba avatar Iamcerba commented on July 23, 2024

@huorswords,

Seems it is something that couldn't be resolved on your side.

More details: dotnet/aspnetcore#4206

The only workaround which I see now (if we want to use InProcess hosting model) is to update Environment.CurrentDirectory variable before log4net initialization:

Environment.CurrentDirectory = "<correct path>";

loggerFactory.AddLog4Net();

The following helper could be used for this: https://github.com/aspnet/Docs/blob/master/aspnetcore/host-and-deploy/aspnet-core-module/samples_snapshot/2.x/CurrentDirectoryHelpers.cs

from microsoft.extensions.logging.log4net.aspnetcore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.