Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Add a DebugLoggerProvider that writes to Debug.WriteLine #194

Closed
DamianEdwards opened this issue Jun 15, 2015 · 17 comments
Closed

Add a DebugLoggerProvider that writes to Debug.WriteLine #194

DamianEdwards opened this issue Jun 15, 2015 · 17 comments

Comments

@DamianEdwards
Copy link
Member

Would be almost identical to the existing ConsoleLoggerProvider but it would write to Debug.WriteLine. It would enable itself only when the debugger is attached.

We should have this provider in the runtime by default so that any app will log messages to the debugger output, e.g. in Visual Studio.

@hishamco
Copy link
Contributor

It will be nice if the logger will be added automatically by the runtime if the debugger is attached
👍

@muratg muratg added this to the 1.0.0-beta6 milestone Jun 26, 2015
@muratg muratg assigned kichalla and victorhurdugaci and unassigned kichalla Jun 26, 2015
@muratg
Copy link

muratg commented Jun 26, 2015

@kichalla We can potentially do this in DNX by bringing logging abstractions to DNX layer when you bring ILogger to DNX. Shouldn't be it's own package.

aspnet/dnx#1118

Will require an update in Hosting too.

@davidfowl
Copy link
Member

i would avoid the dnx for now and keep it localized to hosting

@DamianEdwards
Copy link
Member Author

@davidfowl any particular reason? Because of the churn we're expecting in the DNX? We have other issues RE bringing the LoggerFactory down to DNX so it seems odd to not do it all at once.

@davidfowl
Copy link
Member

Putting things int the dnx requires care in order to avoid pinning before the application loads. That plus the currently refactoring going on it seems unwise to make that layering decision at this point. We need an easy way to move things without pinning it before the app runs

@DamianEdwards
Copy link
Member Author

If that's the case why don't we just put it in the templates only? Hosting still isn't really optional for apps anyway so maybe better to require it to be added by the app explicitly.

@davidfowl
Copy link
Member

+1. We should at least do the feature for beta6 it's trivial. We can discuss moving it in by default at a later date.

@DamianEdwards
Copy link
Member Author

K. What package should we put it in? Microsoft.Framework.Logging?

@davidfowl
Copy link
Member

Separate package like the other providers

@DamianEdwards
Copy link
Member Author

And you get a package! And you get a package! You all get packages!

@PureKrome
Copy link
Contributor

Developers Developers Developers!!!

@victorhurdugaci
Copy link
Contributor

@davidfowl and @DamianEdwards do you like Microsoft.Framework.Logging.Debug as package name?

@DamianEdwards
Copy link
Member Author

@victorhurdugaci yeah that's fine

@victorhurdugaci
Copy link
Contributor

@DamianEdwards, @davidfowl do you want the template to add the logger or do you want it in hosting?

@DamianEdwards
Copy link
Member Author

All of the project templates, inc. Empty.

@victorhurdugaci
Copy link
Contributor

The templates part of this issue is here: aspnet/Templates#124

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants