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

Improve logging and add more messages #76

Merged
merged 1 commit into from
Oct 23, 2015

Conversation

victorhurdugaci
Copy link
Contributor

Fixes #69

please review @Tratcher @rynowak

{
if (_logger.IsEnabled(LogLevel.Verbose))
{
_logger.LogVerbose(LoggingEventIds.MethodMismatch, $"{context.Request.Method} requests are not supported");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug

@rynowak
Copy link
Member

rynowak commented Oct 22, 2015

Take a look at aspnet/Mvc@da731fc - there's a super efficient and more slightly more cleanly pattern added recently

@victorhurdugaci
Copy link
Contributor Author

Updated

static LoggerExtensions()
{
_logMethodNotSupported = LoggerMessage.Define<string>(
logLevel: LogLevel.Debug,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talked to Ryan and he said that most of these should be Verbose, so you always end up with at least one verbose message when the middleware does not handle a request. If it does handle the request then there should be one or more Informational messages.

@victorhurdugaci
Copy link
Contributor Author

Updated

eventId: 5,
formatString: "The request path {Path} does not match an existing file");
_logPathNotModified = LoggerMessage.Define<string>(
logLevel: LogLevel.Verbose,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Info

@victorhurdugaci
Copy link
Contributor Author

Updated again

@Tratcher
Copy link
Member

:shipit:

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

Successfully merging this pull request may close these issues.

None yet

4 participants