This article introduces a new open-source module I built for the DNN8 Module Challenge. It is a Log4Net analyzer for DNN 8. The log analyzer allows users to selected multiple log files generated by the DNN website. It will analyse the logs and summarize the items into a report which shows them by number of occurrences and severity. This will allow website administrators visibility to the health of the website.
This GitHub Project
Go to the LogAnalyzer GitHub Project for the source code and instructions.
The architecture is an MVC DNN 8+ module that uses SignalR to handle notification to the
front end for the long running log analyser process. It uses Knockout for the front end
ajax services and Bootstrap for the UI styling.
MVC Module Development in DNN8
As many of you know, starting in DNN8, we can now develop MVC-based modules for DNN. This project is an MVC module, but because I lean heavily on Knockout for my front end, I use very little of the MVC/Razor constructs to build my view. Notice I have a Controller, Model, and View as is needed in the MVC pattern. Each controller has action methods needed to construct a model and pass it to a corresponding view. To make it work with DNN, notice how the module definition's control source indicates a controller class with a ".mvc" extension.
That just tells DNN that this is an MVC module control and instead of looking for an .ascx file, we are going to invoke the Index action of the Log controller class.
Other Related Tutorials
This is a more advanced topic in module development. Some topics like WebAPI services development, Knockoutjs, in addition to basic module development are assumed when reviewing this material. If you are not familiar with some of these topics, no problem! I have lots of training videos here and on DNNHero.com to get you up to speed.