New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

Improved event logging in DNN 7.4

Everyone who has opened up the event log in DNN has undoubtedly been struck by the fact that there is a lot of information there. The event log is like a huge bin into which the platform and modules can drop anything they wish to log. To help you navigate the flood of information we use color coding and filters. This will allow you to answer questions like “User X had an error when they went to page Y. What happened?” You’d probably want to know when user X had this experience as the log is basically just a chronological list of events. But the event log is not able to answer the question “Who else had this error?” and “Is this error recurring often?” The event log was simply not designed to answer those questions. To address this, I’ve made a few changes to the framework which I’ll elaborate on.

An important shortcoming in the old event log design

The way the old event log worked was that it logged things like portal id, user id, tab id, time and type of event (error, information, etc) into separate fields in the EventLog table in SQL. But the most important parts of an error were stuffed into an XML blurb that was stored in a field (called LogProperties) of type “Text”. This makes it extremely complicated to drill down to the questions mentioned above in SQL. What you see on screen is that XML pumped through some XSL to make it look nice. But there is no way to select and sort by the various details of an error. Only on the main fields like user id, etc.

2015-01-25 16_14_36

Solution approach

The way I’ve approached this is to first change the data layer without changing anything further up in the application. In other words: you won’t notice any changes (yet) in the UI. But we should begin logging the specifics of errors (i.e. exceptions) in a way that allows us to filter by them and get meta information. Like how often a specific error occurs, etc.

In the future I’d love to revise the event log module to allow users to quickly drill down into issues plaguing their DNN installation. But given that we are in a transition period where admin module will be broken out of the main platform into their own projects, it is not the right moment to start working on this.


If we’re logging an exception what we’ll do is to create a (MD5) hash of the complete StackTrace field of that exception. The exception is stored into its own table called Exceptions and the hash serves as the key. The ExceptionHash field is added to the Eventlog so for error events we can link to the exception. Obviously, if we have the exception already in the table, we don’t create a new record. We also no longer log the exception in the LogProperties blurb. This should save on the total size of the EventLog table.

Secondly we create a table ExceptionEvent which attaches to the EventLog table to just add a few typical fields if an exception is being logged like portal id, tab id, and user id. The changed result in the following structure:

2015-01-25 16_26_08

Final words

As said before there is still work to be done to improve the event log (notably in the UI). This is but a first step and from now on people will be logging the exceptions in their own table. For those of you who work in support: you can already leverage these changes by going to SQL directly to analyze errors.

Cross posted from my blog on DNN-Connect


Sebastian Leupold
Peter, thanks for your work.
- what is the reason for creating a 1:1 child table Exception Events - I don't see a benefit.
- LogUserName and LogPortalName seem to be redundant in Eventlog and a violation of 3NF - is there any need for it?
Sebastian Leupold Wednesday, February 4, 2015 4:09 PM (link)
Mitchel Sellers
YAY!!!!! This is awesome! I didn't even notice that this one made it in there.
Mitchel Sellers Thursday, February 5, 2015 4:06 PM (link)
Vassili Merzin
Event Log record send to email by error type sends encoded XML with < and other symbols.
Vassili Merzin Friday, February 13, 2015 8:41 AM (link)
Emails are really broken from event log, example below:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><pre><log LogGUID="030598f9-cecd-49f4-9d26-b4581ed6dfd9" LogFileID="" LogTypeKey="ADMIN_ALERT" LogUserID="-1" LogEventID="67110" LogUserName="host" LogPortalID="-1" LogPortalName="" LogCreateDate="20.05.2015 13:45:03" LogCreateDateNum="0" BypassBuffering="False" LogServerName="SiteName" LogConfigID="94"><LogProperties><LogProperty><PropertyName>Rersource file has been updated</PropertyName><PropertyValue>C:\inetpub\wwwroot\Admin\Security\App_LocalResources\</PropertyValue></LogProperty><LogProperty><PropertyName>Updated Values</PropertyName><PropertyValue>ControlTitle_sendpassword.Text=Retrieve Password; EnterUsername.Text=Palun sisestage kkasutajanimi!; hlLogin.Text=Loobu; OptionUnavailable.Text=Retrieve Password option is currently unavailable.; PasswordSent.Text=Kui sisestatud kasutajanimi oli korrektne, siis peaksite varsti saama e-maili lingiga parooli muutmiseks.; plUsername.Help=Sisestage siia oma kasutajanimi.; plUsername.Text=Kasutajanimi:; RequiresUniqueEmail.Text=&lt;br/&gt;&lt;br/&gt;You can optionally request your password by providing this email address. In this case you do not need to provide the username.; ResetPassword.Text=Unustasin parooli; ResetPasswordHelp.Text=This portal does not support password retrieval. However, you can have a new random password generated for you, which will be sent to the email address you provided during registration.; ResetToken.Text=Saada link; ResetTokenHelp.Text=Kui unustasite parooli, saadetakse teie konto registreeritud e-mailiaadressile sõnum. Sealt leiate lingi, mida klikates avaneb veebileht parooli muutmiseks.; SendPassword.Text=Saada parool</PropertyValue></LogProperty></LogProperties></log>

tanek Wednesday, May 20, 2015 7:42 AM (link)
Sebastian Leupold
Vassili and Tanek,
if you encounter software bugs, please make sure they get logged in the DNN issue tracker at
Thank you!
Sebastian Leupold Thursday, May 28, 2015 1:40 AM (link)

Comment Form

Only registered users may post comments.


Aderson Oliveira (22)
Alec Whittington (11)
Alessandra Daniels (3)
Alex Shirley (10)
Andrew Hoefling (3)
Andrew Nurse (30)
Andy Tryba (1)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (37)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Bogdan Litescu (1)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (213)
Chris Paterra (55)
Clint Patterson (108)
Cuong Dang (21)
Daniel Bartholomew (2)
Daniel Mettler (181)
Daniel Valadas (48)
Dave Buckner (2)
David Poindexter (12)
David Rodriguez (3)
Dennis Shiao (1)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (80)
Francisco Perez Andres (17)
Geoff Barlow (12)
George Alatrash (12)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (274)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Kelly Ford (4)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matt Rutledge (2)
Matthias Schlomann (16)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Miguel Gatmaytan (3)
Mike Horton (19)
Mitchel Sellers (40)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Oliver Hine (1)
Patricio F. Salinas (1)
Patrick Ryan (1)
Peter Donker (54)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Sacha Trauwaen (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott Schlesier (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Steven Fisher (1)
Tony Henrich (3)
Torsten Weggen (3)
Tycho de Waard (4)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (40)
Will Strohl (180)
William Severance (5)
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out