[dotnet] Don't truncate internal log messages at error/warn levels#17333
Conversation
Review Summary by QodoPrevent truncation of warning and error level log messages
WalkthroughsDescription• Prevent truncation of warning and error log messages • Only truncate logs below warn level when configured • Preserve full content for important error diagnostics File Changes1. dotnet/src/webdriver/Internal/Logging/LogContext.cs
|
Code Review by Qodo
|
There was a problem hiding this comment.
Pull request overview
Adjusts .NET internal logging so truncation does not apply to warning/error messages, preserving full content for higher-severity logs.
Changes:
- Update
LogContext.EmitMessageto only truncate when a truncation length is set andlevel < Warn. - Ensure
Warn/Errormessages are emitted without truncation even when truncation is configured.
To see entire error/warn log message for tracebility.
💥 What does this PR do?
This pull request makes a targeted improvement to the logging behavior in
LogContext.cs. Now, log messages are only truncated if a truncation length is set and the log level is belowWarn. This ensures that important warning and error messages are not truncated, preserving their full content for debugging.Logging behavior update:
EmitMessagemethod inLogContext.csso that message truncation only occurs for log levels belowWarnand when a truncation length is specified. ([dotnet/src/webdriver/Internal/Logging/LogContext.csL101-R106](https://github.com/SeleniumHQ/selenium/pull/17333/files#diff-09e55ca02fe7a68ac190114b4bcbe9bc5f68d0b641f226bd17ffaf2a81d465b9L101-R106))🔄 Types of changes