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

Use HostingNullLogScope when no logging #609

Closed
wants to merge 1 commit into from

Conversation

benaadams
Copy link
Contributor

Drops the HostingLogScope from this
After-QueueUserWorkItemCallback

Resolves #367

/cc @davidfowl

@davidfowl
Copy link
Member

Checking IsEnabled for the Hosting logger isn't enough. You need to be able to check if there are any logging providers at all and there's no way to do that.

/cc @lodejard @rynowak

@benaadams
Copy link
Contributor Author

DI or lambda \ Func<object, object> scope?

e.g.

return logger.BeginScopeImpl((state) => new HostingLogScope((HttpContext)state), httpContext);

}
}

public void Dispose()
Copy link
Member

Choose a reason for hiding this comment

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

Elide?

@benaadams
Copy link
Contributor Author

Need to see how this goes aspnet/Logging#366

@davidfowl
Copy link
Member

Closing until the logging issue is resolved.

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