Skip to content

WIP: Implement Serilog in DNN#7044

Open
donker wants to merge 44 commits intodnnsoftware:developfrom
donker:serilog-2026
Open

WIP: Implement Serilog in DNN#7044
donker wants to merge 44 commits intodnnsoftware:developfrom
donker:serilog-2026

Conversation

@donker
Copy link
Copy Markdown
Contributor

@donker donker commented Feb 28, 2026

This PR replaces our Log4net underpinning with Serilog. The advantages are:

  1. Real-time changes in logging when editing the config file without a need for an app restart
  2. Structured logging
  3. The ability to add your own "sinks" (places the log is sent to)

WIP

Todo:

  • Add new dlls to distribution
  • Add writing out default config file to the root folder
  • Add logic to repair a damaged/old config file
  • Repairing all deprecated code in DNN (big effort)

@donker donker added this to the 10.3.0 milestone Feb 28, 2026
@donker donker requested a review from bdukes February 28, 2026 21:25
@donker donker self-assigned this Feb 28, 2026
@donker donker changed the title Implement Serilog in DNN WIP: Implement Serilog in DNN Feb 28, 2026
Copy link
Copy Markdown
Contributor

@bdukes bdukes left a comment

Choose a reason for hiding this comment

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

Thanks for all of the work on this one!

@donker donker modified the milestones: 10.3.0, 10.4.0 Mar 13, 2026
@bdukes
Copy link
Copy Markdown
Contributor

bdukes commented Mar 31, 2026

I've opened a PR to this branch which migrates all logging calls to use LoggerMessage generated methods.

donker and others added 3 commits April 1, 2026 20:37
* Replace usages of IsDebugEnabled

* Replace usages of Debug(Exception)

* Replace remaining usages of Debug

* Replace usages of IsInfoEnabled

* Replace usages of InfoFormat(IFormatProvider, string, object[])

* Replace usages of Info(object)

* Replace remaining usages of Info

* Replace usages of IsTraceEnabled

* Replace usages of TraceFormat(IFormatProvider, string, object[])

* Replace remaining usages of Trace

* Replace usages of IsWarnEnabled

* Replace usages of Warn(object)

* Replace usages of WarnFormat(IFormatProvider, string, object[])

* Replace usages of Warn(string, Exception)

* Replace remaining usages of Warn

* Replace usages of ErrorFormat(IFormatProvider, string, object[])

* Replace usages of Error(object)

* Replace usages of Error(string, Exception)

* Replace remaining usages of Error

* Replace usages of Fatal

* Remove LoggingMigrationExtensions

* Use explicit form of LoggerMessage attribute

For consistency between messages with and without an explicit message

* Organize LoggerMessage event IDs in DotNetNuke.dll

* Organize LoggerMessage event IDs by project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants