Repository navigation
[FSSDK-13478] Update demo app log4net to 3.3.0 - #426
Esra Kartal (esrakartalOpt) wants to merge 1 commit into
Conversation
…ork 4.6.2 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Alex Yong (alexjoeyyong)
left a comment
There was a problem hiding this comment.
Verdict: approve. I checked the log4net 3.3.0 package itself and ran the demo app's real log4net config on 2.0.13 and 3.3.0 side by side; they behave identically. Nothing here is covered by CI (the demo app isn't in it, and the base branch is #425's), so the evidence below is what stands behind it.
TL;DR
- The reference is right. The
net462build insidelog4net3.3.0 is assembly version 3.3.0.0 with public key token669e0ddf0bb1aa2a, which is exactly what the new<Reference>in the csproj says, and thelib\net462\log4net.dllhint path matches the package layout (net462,netstandard2.0). Its target framework is v4.6.2, so the project bump to 4.6.2 is the lowest that works. Onnet462the package has no NuGet dependencies, so nothing else needs adding. - Everything the demo's config names still exists in 3.x:
Log4NetConfigurationSectionHandler,XmlConfigurator,FileAppender+MinimalLock,LevelRangeFilter,PatternLayout,LogManager. - Same behaviour as before. I ran the demo's real
Log4Net.config(file appender,MinimalLock,INFOtoFATALrange filter, same pattern) through the configurator the way theWeb.configsection handler does, and made the sameILog.Logger.Log(Type, Level, message, null)calls thatLog4NetLogger.csmakes, on both versions under Mono. Both wrote theINFOandERRORlines in the same format and filtered theDEBUGline. - Config edits are consistent:
Web.configcompilationandhttpRuntimemove from 4.5 to 4.6.2 to match the project, and the README now states the 4.6.2 floor.
CI: only the Jira reference check ran (pass). Workflows here target PRs into master, and this PR's base is #425's branch, so none of the build jobs ran, and OptimizelySDK.NETFramework.sln doesn't include the demo app anyway.
Proof
Results
log4net 3.3.0 nupkg: lib/net462, lib/netstandard2.0; nuspec dependencies: net462 none; netstandard2.0 System.Configuration.ConfigurationManager 4.5.0
Assembly log4net (net462): 3.3.0.0, public key token 669e0ddf0bb1aa2a, TargetFramework .NETFramework,Version=v4.6.2
log4net.Config.Log4NetConfigurationSectionHandler present
log4net.Config.XmlConfigurator present
log4net.Appender.FileAppender+MinimalLock present
log4net.Filter.LevelRangeFilter present
log4net.Layout.PatternLayout present
log4net.LogManager present
demo Log4Net.config, same code path, Mono:
log4net 2.0.13: [1] INFO System.String - [Optimizely Sample Log4NetLogger] info line
[1] ERROR System.String - [Optimizely Sample Log4NetLogger] error line (DEBUG filtered)
log4net 3.3.0: [1] INFO System.String - [Optimizely Sample Log4NetLogger] info line
[1] ERROR System.String - [Optimizely Sample Log4NetLogger] error line (DEBUG filtered)
Not tested: building or running the ASP.NET demo app under IIS or Visual Studio (not possible here; not part of CI).
Findings
Blockers: none. Should-fix: none.
Notes (no change asked)
- Merge order: this is stacked on #425. Merge #425 first, then retarget this to
master. GitHub retargets it automatically, but it doesn't run the build jobs again on its own; that's fine here because the demo app isn't built in CI. packages.confignow listslog4netastargetFramework="net462"while the rest of the file saysnet45. NuGet accepts the mix and VS rewrites it when it next restores; no action needed.
Ponytail
Lean already: 7 lines changed across four files, each required by the version bump. Nothing to cut.
net: 0 lines possible.
Principles (installed principles plugin v0.5.0, org layer; no repo-level checks)
Applied by hand, not the full recorded run. SEC-6.S1 pass (clears the log4net advisory). CODE-1.S1 pass (added README text states the current floor, not history). FUN-2.S1 not evaluable by CI (no job covers the demo app); I covered it with the side-by-side run above.
Summary
Fixes the only open Dependabot alert (#24,
log4netbefore 3.3.0, in the demo app) from FSSDK-13478. It also clears the samelog4netfinding in Arnica (FSSDK-13477).Stacked on #425. Both PRs edit
packages.config, so this one is based on #425's branch. Merge #425 first. GitHub then retargets this PR tomaster.packages.config:log4net2.0.13 to 3.3.0.OptimizelySDK.DemoApp.csproj: log4net reference and path updated. The app now targets .NET Framework 4.6.2, because log4net 3.x ships onlynet462andnetstandard2.0.Web.config:targetFramework4.5 to 4.6.2.README.md: replaced the note from [FSSDK-13477] Fix Arnica findings: checkout credentials, SDK key in URL, CMAB hash, demo app #425 that said log4net stays at 2.0.13.Test plan
log4net 3.3.0.0. Without the package the same build fails (CS0246), so the check does test the reference.Log4NetLogger.cswith its realLog4Net.configand config section handler against 3.3.0 and 2.0.13: both write the same INFO and ERROR lines, and DEBUG is filtered out.OptimizelySDK.NETFramework.slndoes not include it).Issues
🤖 Generated with Claude Code