Git Product home page Git Product logo

Comments (8)

cemrich avatar cemrich commented on June 3, 2024

What's the big difference between these two?

from chocolateygui.

chrissie1 avatar chrissie1 commented on June 3, 2024

Log4net had been dead for a few years, while nlog is being actively developed. Lately log4net has come back alive but the signed their assemblies and made a mess of the versioning.

This.log is an easy way to include logging in your code since it no longer needs you to add private ILog log = ... to every class. You can just do this.Log.Debug("...") and it will pick the classname from that.

from chocolateygui.

cemrich avatar cemrich commented on June 3, 2024

Okay, that's good to know.

from chocolateygui.

gep13 avatar gep13 commented on June 3, 2024

Thinking about this, and having not looked too closely at the code yet, do we need to abstract this into an interface, and then use the IoC Container to provide a specific instance on the interface, rather than taking a direct dependency on a specific logging framework?

from chocolateygui.

chrissie1 avatar chrissie1 commented on June 3, 2024

No, this.log abstracts it away for you. No need to inject since it is an extension method.

from chocolateygui.

gep13 avatar gep13 commented on June 3, 2024

Cool, I really need to check out this package :-)

from chocolateygui.

chrissie1 avatar chrissie1 commented on June 3, 2024

This is my current nlog config for rollingfileappender.

<nlog>
    <targets>
      <target name="file" type="File" fileName="${basedir}/logs/chocolateygui_${level}.log" layout="${longdate} ${threadid} [${level:uppercase=true}] ${logger} ${message}" archiveFileName="${basedir}/logs/chocolateygui_${level}.{#}.log" archiveAboveSize="1048576" archiveNumbering="Sequence" maxArchiveFiles="10" concurrentWrites="true" keepFileOpen="false" encoding="iso-8859-2" />
    </targets>
    <rules>
      <logger name="*" minlevel="Debug" writeTo="file" />
    </rules>
  </nlog>

from chocolateygui.

gep13 avatar gep13 commented on June 3, 2024

Hold on a minute...

Where are the other 20 odd lines of XML that is normally required?!? :-P

from chocolateygui.

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.