-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
False positive for SYSLIB1006
when user haven't specified EventID
#72263
Comments
Tagging subscribers to this area: @dotnet/area-extensions-logging Issue DetailsDescriptionRelated to discussion in #70147 (reply in thread) SYSLIB1006 warning states that multiple logging methods cannot use the same event ID. But it also fires when EventID isn't specified at all. I've annotated my methods without event id: [LoggerMessage(Level = LogLevel.Information, Message = "Hi there")]
...
[LoggerMessage(Level = LogLevel.Information, Message = "Hi there2")] and still get a Reproduction StepsShown above Expected behaviorNo warning or at least lower severity event Actual behaviorWarning which fails the build (since we have Regression?No Known WorkaroundsDisable the warning ConfigurationNo response Other informationNo response
|
Info
level event instead of SYSLIB1006
for cases where user haven't specified EventID
SYSLIB1006
when user haven't specified EventID
According to https://docs.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line#log-event-id |
Event ids are per category |
When this would get addressed? I just now hit this issue! |
Description
Related to discussion in #70147 (reply in thread)
CC: @davidfowl
SYSLIB1006 warning states that multiple logging methods cannot use the same event ID.
But it also fires when EventID isn't specified at all. I've annotated my methods without event id:
and still get a
SYSLIB1006
warning.Reproduction Steps
Shown above
Expected behavior
No warning or at least lower severity event
Actual behavior
Warning which fails the build (since we have
Treat warnings as errors
enabled)Regression?
No
Known Workarounds
Disable the warning
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: