Skip to content

Fix stresslog facility and log level mix-up. #116467

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

Merged

Conversation

lateralusX
Copy link
Member

As part of commit:

6bd555e

some stress log macro implementations got changed, but the call to StressLog::LogMsg in gcenv.h and stresslog.h got level and facility arguments switched, leading to no logging when these macros are used.

PR restore the order of the level and facility arguments in call to StressLog::LogMsg.

As part of commit:

dotnet@6bd555e

some stress log macro implementations got changed, but the call to
StressLog::LogMsg in gcenv.h and stresslog.h got level and facility arguments
switched, leading to no logging when these macros are used.

Fix restore the order of the level and facility arguments in call to
StressLog::LogMsg.
@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 10:16
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the logging issue by restoring the correct order of the level and facility arguments when calling StressLog::LogMsg.

  • The argument order in the stress log macro in stresslog.h is corrected.
  • The argument order for StressLog::LogMsg in gcenv.h is similarly updated.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/coreclr/inc/stresslog.h Corrected argument order to properly pass log level and facility.
src/coreclr/gc/env/gcenv.h Adjusted argument order to ensure StressLog::LogMsg receives parameters in the correct order.
Comments suppressed due to low confidence (2)

src/coreclr/inc/stresslog.h:78

  • Ensure that the new parameter order (log level first, then facility) aligns with the StressLog::LogMsg implementation and intended usage.
StressLog::LogMsg(level, facility, 0, msg);

src/coreclr/gc/env/gcenv.h:60

  • Verify that passing the log level before the facility is correct for the StressLog::LogMsg API to restore proper logging functionality.
StressLog::LogMsg(level, facility, StressLogMsg(msg, __VA_ARGS__));

Copy link
Contributor

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

@jkotas jkotas merged commit cb87379 into dotnet:main Jun 10, 2025
95 of 97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants