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/OAuthAuthorizationServer | |
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/OAuthAuthorizationServer')
-rw-r--r-- | samples/OAuthAuthorizationServer/Global.asax.cs | 13 | ||||
-rw-r--r-- | samples/OAuthAuthorizationServer/OAuthAuthorizationServer.csproj | 6 | ||||
-rw-r--r-- | samples/OAuthAuthorizationServer/packages.config | 1 |
3 files changed, 7 insertions, 13 deletions
diff --git a/samples/OAuthAuthorizationServer/Global.asax.cs b/samples/OAuthAuthorizationServer/Global.asax.cs index d878ea6..8e3aefa 100644 --- a/samples/OAuthAuthorizationServer/Global.asax.cs +++ b/samples/OAuthAuthorizationServer/Global.asax.cs @@ -8,7 +8,9 @@ using Code;
- /// <summary>
+ using DotNetOpenAuth.Logging;
+
+ /// <summary>
/// The global MVC Application.
/// </summary>
/// <remarks>
@@ -24,7 +26,7 @@ /// <summary>
/// The logger for this sample to use.
/// </summary>
- public static log4net.ILog Logger = log4net.LogManager.GetLogger("DotNetOpenAuth.OAuthAuthorizationServer");
+ public static ILog Logger = LogProvider.GetLogger("DotNetOpenAuth.OAuthAuthorizationServer");
public static DatabaseKeyNonceStore KeyNonceStore { get; set; }
@@ -83,19 +85,16 @@ KeyNonceStore = new DatabaseKeyNonceStore();
- log4net.Config.XmlConfigurator.Configure();
+/// LogProvider.SetCurrentLogProvider(new ....)
Logger.Info("Sample starting...");
}
protected 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();
}
protected 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());
// In the event of an unhandled exception, reverse any changes that were made to the database to avoid any partial database updates.
var dataContext = DataContextSimple;
diff --git a/samples/OAuthAuthorizationServer/OAuthAuthorizationServer.csproj b/samples/OAuthAuthorizationServer/OAuthAuthorizationServer.csproj index 1e373b3..0199aed 100644 --- a/samples/OAuthAuthorizationServer/OAuthAuthorizationServer.csproj +++ b/samples/OAuthAuthorizationServer/OAuthAuthorizationServer.csproj @@ -21,7 +21,7 @@ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{C78E8235-1D46-43EB-A912-80B522C4E9AE}</ProjectGuid> - <ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> + <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>OAuthAuthorizationServer</RootNamespace> @@ -48,10 +48,6 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> <Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Private>True</Private> diff --git a/samples/OAuthAuthorizationServer/packages.config b/samples/OAuthAuthorizationServer/packages.config index 7d02581..5320a83 100644 --- a/samples/OAuthAuthorizationServer/packages.config +++ b/samples/OAuthAuthorizationServer/packages.config @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> <package id="Microsoft.AspNet.Mvc" version="5.0.0" targetFramework="net45" /> <package id="Microsoft.AspNet.Razor" version="3.0.0" targetFramework="net45" /> <package id="Microsoft.AspNet.WebPages" version="3.0.0" targetFramework="net45" /> |