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

Logs from routing #2860

Closed
jbfp opened this issue Jul 25, 2015 · 7 comments
Closed

Logs from routing #2860

jbfp opened this issue Jul 25, 2015 · 7 comments
Assignees
Milestone

Comments

@jbfp
Copy link

jbfp commented Jul 25, 2015

When using the Microsoft.Framework.Logging.ILoggerFactory and DI, is it possible to get MVC routing to be a little more quiet? I use LogLevel.Information quite a bit myself, but so does MVC routing apparently.
Specifically the lines where it logs (at level 'Information') when it matches a route:

_logger.LogInformation(
"Request successfully matched the route with name '{RouteName}' and template '{RouteTemplate}'.",
matchingEntry.RouteName,
matchingEntry.RouteTemplate);

Perhaps this log is more 'verbose' than 'information'?

@davidfowl
Copy link
Member

Are you using beta5?

@jbfp
Copy link
Author

jbfp commented Jul 25, 2015

Yep, all packages are beta5 on VS2015

@Eilon
Copy link
Member

Eilon commented Jul 26, 2015

We recently updated that log levels of most log events so that the Information level should be very quiet - at most a few log entries per "normal" request.

Can you try with the latest build? I took a quick look and the only LogInformation that I saw was the one you pointed out. We're contemplating removing even that one, but we're not sure if we want to remove all the Information logs from the request...

@jbfp
Copy link
Author

jbfp commented Jul 27, 2015

The latest builds are from the aspnetvnext MyGet feed, which is the "dev" branch, right? The dev branch still has that one specific Information log and it didn't make a difference in the log amount. It's not a big deal when it's just me testing, but I made the mistake of using 'wrk' (http load testing tool) with logging on and, well, the logs now tell me that MVC did in fact find the correct route a couple thousand times 😉

@Eilon
Copy link
Member

Eilon commented Jul 27, 2015

Yes, the dev branch is the most recent code and has that one Information log. Do you feel that even just that one log is too noisy? Most log systems have ways of filtering out events - all the Microsoft ones have event names that start with Microsoft... if you want to filter them all out.

@danroth27 danroth27 modified the milestone: 6.0.0-beta7 Jul 30, 2015
@danroth27 danroth27 removed this from the 6.0.0-beta7 milestone Jul 30, 2015
@danroth27 danroth27 added this to the 6.0.0-beta7 milestone Jul 31, 2015
@danroth27
Copy link
Member

@lodejard @rynowak @Eilon We think at the Information level there should really only be one log event per request from the framework - that a request happened.This should probably be done in hosting instead of in routing. All the other details about what happened for that request should probably be at the Verbose level.

@Eilon Eilon modified the milestones: 6.0.0-beta8, 6.0.0-beta7 Aug 7, 2015
@rynowak
Copy link
Member

rynowak commented Aug 19, 2015

Fixed the attribute routing part: e61ebca

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

6 participants