Click here to Skip to main content
15,886,110 members
Articles / Web Development / ASP.NET

Log Reporting Dashboard for ASP.NET MVC

Rate me:
Please Sign up or sign in to vote.
4.94/5 (60 votes)
23 Aug 2010CPOL12 min read 174.4K   5.6K   193  
Log reporting dashboard for Log4Net, NLog, ELMAH, and ASP.NET Health Monitoring.
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcLoggingDemo.Models.LogEvent>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Details
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Details</h2>

    <p>        
        <%: Html.ActionLink("Back to List", "Index") %>
    </p>

    <fieldset>
        <legend>Fields</legend>
        
        <div class="display-label">Id</div>
        <div class="display-field"><%: Model.Id %></div>
        
        <div class="display-label">LogDate</div>
        <div class="display-field"><%: String.Format("{0:g}", Model.LogDate) %></div>
        
        <div class="display-label">Name</div>
        <div class="display-field"><%: Model.LoggerProviderName %></div>
        
        <div class="display-label">Source</div>
        <div class="display-field"><%: Model.Source %></div>
        
        <div class="display-label">MachineName</div>
        <div class="display-field"><%: Model.MachineName %></div>
        
        <div class="display-label">Type</div>
        <div class="display-field"><%: Model.Type %></div>
        
        <div class="display-label">Level</div>
        <div class="display-field"><%: Model.Level %></div>
        
        <div class="display-label">Message</div>
        <div class="display-field">
            <pre><%: Model.Message.WordWrap(80) %></pre>
        </div>
        
        <div class="display-label">StackTrace</div>
        <div class="display-field"><%: Model.StackTrace %></div>                      
        
    </fieldset>

    <% =FormsHelper.OutputXmlTableForLogging(Model.AllXml) %>

    <p>        
        <%: Html.ActionLink("Back to List", "Index") %>
    </p>

</asp:Content>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Simbient
Australia Australia
Darren Weir is a senior .NET developer working for Simbient in North Sydney, Australia.

My blog is located at dotnetdarren.wordpress.com

Comments and Discussions