Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EventId, LogLevel, and message generation for event payloads #8637

Merged
merged 1 commit into from
May 30, 2017

Conversation

ajcvickers
Copy link
Contributor

Issue #7939

Also adds nominal types for all events other than those in the relational design assemblies. (Since these assemblies are currently being refactored.)

Each event payload now contains all the information needed to create and log the message for the event, including overridden ToString that creates the message.

[NotNull] Exception exception)
{
var definition = CoreStrings.LogExceptionDuringSaveChanges;

definition.Log(
diagnostics,
contextType, Environment.NewLine, exception,
context.GetType(), Environment.NewLine, exception,
Copy link
Contributor

Choose a reason for hiding this comment

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

Duped exception arg being passed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. I generally didn't change any of the logger messages that we generate. So where we had the exception in the message format string it is still there. I don't think there is a way to get it into the format string using the LoggerMessage facilities without including it as one of the args, meaning it gets duplicated here. But we could choose to remove it from the message if we wanted to.

Issue #7939

Also adds nominal types for all events other than those in the relational design assemblies. (Since these assemblies are currently being refactored.)

Each event payload now contains all the information needed to create and log the message for the event, including overridden ToString that creates the message.
@ajcvickers ajcvickers merged commit 2782a55 into dev May 30, 2017
@smitpatel smitpatel deleted the SlimShady0528 branch June 2, 2017 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants