diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-09 00:15:09 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-09 00:15:09 +0200 |
| commit | c9597d3b4a053b7a1246419cb31517dd9f530543 (patch) | |
| tree | 0ff985015cc4c6a6bf0b5bdefa6ff9726d5de422 /Software/Visual_Studio/Tango.Web/TangoWebApplication.cs | |
| parent | af1c7bd1b6122c1387fe6e2749f9847f4be84b16 (diff) | |
| download | Tango-c9597d3b4a053b7a1246419cb31517dd9f530543.tar.gz Tango-c9597d3b4a053b7a1246419cb31517dd9f530543.zip | |
Working on azure utils...
Fixed issue with TangoWebApplication logging.
Diffstat (limited to 'Software/Visual_Studio/Tango.Web/TangoWebApplication.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Web/TangoWebApplication.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Software/Visual_Studio/Tango.Web/TangoWebApplication.cs b/Software/Visual_Studio/Tango.Web/TangoWebApplication.cs index a8acc419c..1f98d0a39 100644 --- a/Software/Visual_Studio/Tango.Web/TangoWebApplication.cs +++ b/Software/Visual_Studio/Tango.Web/TangoWebApplication.cs @@ -19,14 +19,17 @@ namespace Tango.Web { public override void OnException(HttpActionExecutedContext context) { - ErrorLogService.LogError(context.Exception); + 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) @@ -37,14 +40,5 @@ namespace Tango.Web LogManager.Default.Log(exception, "Global Exception!"); } } - - //common service to be used for logging errors - public static class ErrorLogService - { - public static void LogError(Exception ex) - { - LogManager.Default.Log(ex, "Global Exception!"); - } - } } } |
