diff options
author | David Christiansen <DavidChristiansen@users.noreply.github.com> | 2015-01-05 09:33:24 +0000 |
---|---|---|
committer | David Christiansen <DavidChristiansen@users.noreply.github.com> | 2015-01-05 09:33:24 +0000 |
commit | 3770a51d19a04be18ade75f59e0ff1687010a130 (patch) | |
tree | 240382c976672ed421d529860117e37677328f02 /samples/OAuthResourceServer/Code/Global.cs | |
parent | 7574924b2b5c810b7c00328f04f506f28da3f2ec (diff) | |
parent | a14dcb800b25d1b0477ab123b6865d90865f96f0 (diff) | |
download | DotNetOpenAuth-3770a51d19a04be18ade75f59e0ff1687010a130.zip DotNetOpenAuth-3770a51d19a04be18ade75f59e0ff1687010a130.tar.gz DotNetOpenAuth-3770a51d19a04be18ade75f59e0ff1687010a130.tar.bz2 |
Merge pull request #359 from DavidChristiansen/develop
Closes #356, Closes #357, Closes #358
Diffstat (limited to 'samples/OAuthResourceServer/Code/Global.cs')
-rw-r--r-- | samples/OAuthResourceServer/Code/Global.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/samples/OAuthResourceServer/Code/Global.cs b/samples/OAuthResourceServer/Code/Global.cs index a48baff..bf58c9c 100644 --- a/samples/OAuthResourceServer/Code/Global.cs +++ b/samples/OAuthResourceServer/Code/Global.cs @@ -5,6 +5,8 @@ using System.ServiceModel; using System.Text; using System.Web; + + using DotNetOpenAuth.Logging; using DotNetOpenAuth.OAuth2; using DotNetOpenAuth.OAuth2.Messages; @@ -39,7 +41,7 @@ /// <summary> /// The logger for this sample to use. /// </summary> - public static log4net.ILog Logger = log4net.LogManager.GetLogger("DotNetOpenAuth.OAuthResourceServer"); + public static ILog Logger = LogProvider.GetLogger("DotNetOpenAuth.OAuthResourceServer"); #if SAMPLESONLY /// <summary> @@ -85,19 +87,15 @@ } private void Application_Start(object sender, EventArgs e) { - log4net.Config.XmlConfigurator.Configure(); Logger.Info("Sample starting..."); } private void Application_End(object sender, EventArgs e) { Logger.Info("Sample shutting down..."); - - // this would be automatic, but in partial trust scenarios it is not. - log4net.LogManager.Shutdown(); } private void Application_Error(object sender, EventArgs e) { - Logger.Error("An unhandled exception occurred in ASP.NET processing: " + Server.GetLastError(), Server.GetLastError()); + Logger.ErrorException("An unhandled exception occurred in ASP.NET processing: " + Server.GetLastError(), Server.GetLastError()); } private void Application_EndRequest(object sender, EventArgs e) { |