aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/App.xaml
blob: aa78e02a432a63dede81760399872dd95a152437 (plain)
1
2
3
4
5
6
7
8
9
10
11
<Application x:Class="Tango.PPC.Synchronization.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/Tango.PPC.Common;component/Resources/Merged.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
lass="k">using System.Text; using System.Threading.Tasks; using System.Web; using System.Web.Http; using System.Web.Http.Filters; using System.Web.Mvc; using Tango.Logging; using Tango.Web.Logging; namespace Tango.Web { public class TangoWebApplication : HttpApplication { //Create filter public class LogExceptionFilterAttribute : ExceptionFilterAttribute { public override void OnException(HttpActionExecutedContext context) { LogManager.Default.Log(context.Exception); } } protected virtual void Application_Start() { LogManager.Default.Categories.Add(LogCategory.Debug); LogManager.Default.RegisterLogger(new AzureCloudLogger()); GlobalConfiguration.Configuration.Filters.Add(new LogExceptionFilterAttribute()); LogManager.Default.Log("Application Started!"); } protected void Application_Error(object sender, EventArgs e) { Exception exception = Server.GetLastError(); if (exception != null) { LogManager.Default.Log(exception, "Global Exception!"); } } } }