Git Product home page Git Product logo

Comments (10)

huorswords avatar huorswords commented on July 23, 2024

Hello @sBoff ,

Thank you very much by your feedback.

This seems an issue coming from log4net library itself, as the appender implementation is not a part of Microsoft.Extensions.Logging.Log4Net.AspNetCore nuget.

I'm sorry, my fault, but I don't know how to help you on that.

Can you raise the issue on the corresponding project instead?

Regards.

from microsoft.extensions.logging.log4net.aspnetcore.

sBoff avatar sBoff commented on July 23, 2024

Hi @huorswords,

The log4net implementation is fine. It works as expected in other applications. It is the implementation of Log4NetLogger that is causing the problem - specifically this line in the Log4NetLogger constructor:

log4net.Config.XmlConfigurator.Configure(loggerRepository, xmlElement);

I don't believe XmlConfigurator.Configure should not be called for each logger instance that is created. In a typical application, this method is called once at startup. When new loggers are created, this method is not called again. It is this method that causes the log file to be deleted/recreated and hence, wipes out any log entries created before the last instance of Log4NetLogger is created.

I'll put forth a pull request soon.

from microsoft.extensions.logging.log4net.aspnetcore.

huorswords avatar huorswords commented on July 23, 2024

Hi again,

Cool, thank you very much! I will wait for the pull request then.

Regards

from microsoft.extensions.logging.log4net.aspnetcore.

sBoff avatar sBoff commented on July 23, 2024

@huorswords, I've been trying to do a pull request for the last hour with little success. I can connect to github and authenticate but it always returns the following when I try to push.

ERROR: Permission to huorswords/Microsoft.Extensions.Logging.Log4Net.AspNetCore.git denied to sBoff.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Are there some permissions you need to grant me, or something obvious you know I would be doing wrong?

Regards.

from microsoft.extensions.logging.log4net.aspnetcore.

sBoff avatar sBoff commented on July 23, 2024

I ended up having to fork this repository, create the fix, and then do a pull request from my fork to this repo. Is that the normal way? I would have expected to be able to create a branch and do a pull request directly from this repo?

from microsoft.extensions.logging.log4net.aspnetcore.

huorswords avatar huorswords commented on July 23, 2024

Hello @sBoff ,

Yes, I think that Fork flow is the default flow on Github repos by default. I didn't change permissions from the beginning, and also I do not include yet the Contributing document on the repo.

My fault, sorry.

Thank you very much by your contribution.

from microsoft.extensions.logging.log4net.aspnetcore.

sBoff avatar sBoff commented on July 23, 2024

Thanks @huorswords, I didn't realize forking was the default flow, all sorted now 👍

from microsoft.extensions.logging.log4net.aspnetcore.

huorswords avatar huorswords commented on July 23, 2024

Merged!

Thank you very much. I will schedule the master release as soon as possible.

Thank you very much again, @sBoff .

from microsoft.extensions.logging.log4net.aspnetcore.

huorswords avatar huorswords commented on July 23, 2024

Hi @sBoff ,

Just to let you know. Your changes are available on the 2.0.3 version of the nuget package.

Thank you. Regards,

from microsoft.extensions.logging.log4net.aspnetcore.

sBoff avatar sBoff commented on July 23, 2024

@huorswords, amazing, thanks very much :)

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.