Git Product home page Git Product logo

Comments (5)

ghuntley avatar ghuntley commented on September 27, 2024

We were just discussing this over in the ReactiveUI slack channel.

Matt:

Splat has a debug logger, but it doesn't work.

Paul Betts:

Console.WriteLine doesn't exist on all platforms. Which is why it's not in-box in the first place

Geoff:

Why don't we ship platform specific implementations by default. Do or Don't enable it for them by default (my vote is dont). Whatever the analogue of Console.Writeline is, send the output there so it shows up in the dev environment. The landscape right now is consumers of the project implement the interface and basically do that anyway right?

Ryan:

You can do Debug.WriteLine from a PCL but it does at least output to the output window 🎉

Paul Betts

Debug.WriteLine is useless in a library because it gets stripped from release builds. There is ​_no_​ way a library compiled for Release build can write to the debug output window in UWP apps

Geoff:

What if we shipped a nuget package that installed a .cs into their solution? Yes that behaviour is annoying but better than asking people to wire up the logger.

Paul Betts:

This isn't a terrible idea tbh

from splat.

johannesegger avatar johannesegger commented on September 27, 2024

Ohh ok, so I guess this issue is somewhat superfluous. Feel free to close it and thanks for posting the conversation.

from splat.

ghuntley avatar ghuntley commented on September 27, 2024

np, you should come join us in Slack :-)

We will keep the issue open because right now because the default logging impl w/Splat sucks until such a time it doesn't.

from splat.

NZSmartie avatar NZSmartie commented on September 27, 2024

ASPNet Core's Debug Logger solves this by #define DEBUG as seen here
https://github.com/aspnet/Logging/blob/rel/2.0.0/src/Microsoft.Extensions.Logging.Debug/DebugLogger.debug.cs#L7

The catch is that the debug function itself is in a separate file to prevent unintended behaviour from happening that may be caused by DEBUG being present.

from splat.

ghuntley avatar ghuntley commented on September 27, 2024

@NZSmartie. You legend! Send in the PR please (plus that super super handy comment explaining why)

from splat.

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.