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

logging: Tag Helpers: MVC Tag Helpers should log warnings #1686

Closed
DamianEdwards opened this issue Dec 9, 2014 · 2 comments
Closed

logging: Tag Helpers: MVC Tag Helpers should log warnings #1686

DamianEdwards opened this issue Dec 9, 2014 · 2 comments

Comments

@DamianEdwards
Copy link
Member

Generally speaking, Tag Helpers should only throw runtime exceptions due to bad input, e.g. the AnchorTagHelper should throw if the value specified for asp-controller isn't a valid controller name.

However there are many other cases where it would be helpful to notify the user of the helper's decision to no-op or otherwise, even when it isn't an error case, e.g. <label asp-for="FirstName" for="FirstName">First Name:</label> this will effectively no-op the LabelTagHelper as the for attribute and label display text have been specifically supplied and will be honored.

In these cases the Tag Helpers should log a warning. It should be done in such a way that someone viewing the logs could filter to show all warnings from all the MVC Tag Helpers, or specific Tag Helpers, e.g. only show warnings from the InputTagHelper.

@DamianEdwards DamianEdwards added this to the 6.0.0-rc1 milestone Dec 9, 2014
@yishaigalatzer yishaigalatzer changed the title Tag Helpers: MVC Tag Helpers should log warnings to the trace system logging: Tag Helpers: MVC Tag Helpers should log warnings Dec 12, 2014
@yishaigalatzer
Copy link
Contributor

Need to be specific about the trace level we want here.

We got to be careful when selecting the level, as for example Warning might be too verbose, for the cases exposed above.

@yishaigalatzer yishaigalatzer modified the milestones: 6.0.0-beta3, 6.0.0-rc1 Jan 11, 2015
@danroth27 danroth27 mentioned this issue Mar 12, 2015
@danroth27 danroth27 modified the milestones: 6.0.0-rc1, 6.0.0 Mar 16, 2015
@kichalla
Copy link
Member

Commit 0a1918a

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

5 participants