You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetRenderedFormat(object message, string stringRepresentationOfNull = "") in Tracer.Log4net/Adapters/LoggerAdapter.cs calls enumerable.Reset(), this method might throw a notSupported or notImplemented Exception as per
As a workaround I tried the setting "LogUseSafeParameterRendering" but I noticed this:
var config = Environment.GetEnvironmentVariable("LogUseSafeParameterRendering");
I don't think GetEnvironmentVariable looks at the app config at all as per the version history
The text was updated successfully, but these errors were encountered:
When an enumerated value is logged you have to call the reset to set it back to start so that the real code can enumerate it. Logging enumerated value is unsafe in the sense that you cannot check in advance if the enumerator can be used twice and if it returns the same values for the two calls. Not logging IEnumerables at all is a big price to pay for some edge cases, so - as you already found in the code - one can use the LogUseSafeParameterRendering flag. I cannot read it from app config as the adapter is netstandard. In hindsight it would've been better to enable turning off parameter logging on a per parameter level (like using NoTrace on a parameter).
GetRenderedFormat(object message, string stringRepresentationOfNull = "") in Tracer.Log4net/Adapters/LoggerAdapter.cs calls enumerable.Reset(), this method might throw a notSupported or notImplemented Exception as per
https://docs.microsoft.com/en-us/dotnet/api/system.collections.ienumerator.reset?view=netframework-4.8
As a workaround I tried the setting "LogUseSafeParameterRendering" but I noticed this:
var config = Environment.GetEnvironmentVariable("LogUseSafeParameterRendering");
I don't think GetEnvironmentVariable looks at the app config at all as per the version history
The text was updated successfully, but these errors were encountered: