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

Check hostingLog enabled #931

Merged
merged 2 commits into from
Feb 8, 2017
Merged

Conversation

benaadams
Copy link
Contributor

@benaadams benaadams commented Feb 8, 2017

Is showing up in traces; IsEnabled() can be inlined Write(.. cannot, even though it then exits early with an enabled test.

Resolves #932

@benaadams
Copy link
Contributor Author

@benaadams
Copy link
Contributor Author

benaadams commented Feb 8, 2017

/cc @muratg

@@ -43,7 +43,9 @@ public Context CreateContext(IFeatureCollection contextFeatures)
_diagnosticSource.Write("Microsoft.AspNetCore.Hosting.BeginRequest", new { httpContext = httpContext, timestamp = startTimestamp });
}

HostingEventSource.Log.RequestStart(httpContext.Request.Method, httpContext.Request.Path);
var hostingLog = HostingEventSource.Log;
if (hostingLog.IsEnabled())
Copy link
Member

Choose a reason for hiding this comment

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

style: always use curly brackets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@Tratcher Tratcher merged commit 1b01da7 into aspnet:dev Feb 8, 2017
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.

4 participants