summaryrefslogtreecommitdiffstats
path: root/samples/OAuthConsumer
diff options
context:
space:
mode:
Diffstat (limited to 'samples/OAuthConsumer')
-rw-r--r--samples/OAuthConsumer/Code/Logging.cs6
-rw-r--r--samples/OAuthConsumer/Code/TracePageAppender.cs13
-rw-r--r--samples/OAuthConsumer/Global.asax.cs11
-rw-r--r--samples/OAuthConsumer/OAuthConsumer.csproj5
-rw-r--r--samples/OAuthConsumer/packages.config1
5 files changed, 9 insertions, 27 deletions
diff --git a/samples/OAuthConsumer/Code/Logging.cs b/samples/OAuthConsumer/Code/Logging.cs
index 510ea85..dcd2813 100644
--- a/samples/OAuthConsumer/Code/Logging.cs
+++ b/samples/OAuthConsumer/Code/Logging.cs
@@ -5,7 +5,9 @@
using System.Text;
using System.Web;
- /// <summary>
+ using DotNetOpenAuth.Logging;
+
+ /// <summary>
/// Logging tools for this sample.
/// </summary>
public static class Logging {
@@ -17,6 +19,6 @@
/// <summary>
/// The logger for this sample to use.
/// </summary>
- public static log4net.ILog Logger = log4net.LogManager.GetLogger("DotNetOpenAuth.OAuthConsumer");
+ public static ILog Logger = LogProvider.GetLogger("DotNetOpenAuth.OAuthConsumer");
}
} \ No newline at end of file
diff --git a/samples/OAuthConsumer/Code/TracePageAppender.cs b/samples/OAuthConsumer/Code/TracePageAppender.cs
deleted file mode 100644
index 5d3ba36..0000000
--- a/samples/OAuthConsumer/Code/TracePageAppender.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace OAuthConsumer {
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Web;
-
- public class TracePageAppender : log4net.Appender.AppenderSkeleton {
- protected override void Append(log4net.Core.LoggingEvent loggingEvent) {
- StringWriter sw = new StringWriter(Logging.LogMessages);
- Layout.Format(sw, loggingEvent);
- }
- }
-} \ No newline at end of file
diff --git a/samples/OAuthConsumer/Global.asax.cs b/samples/OAuthConsumer/Global.asax.cs
index 10f297e..fbe339f 100644
--- a/samples/OAuthConsumer/Global.asax.cs
+++ b/samples/OAuthConsumer/Global.asax.cs
@@ -4,17 +4,16 @@
using System.Linq;
using System.Web;
- public partial class Global : HttpApplication {
+ using DotNetOpenAuth.Logging;
+
+ public partial class Global : HttpApplication {
protected void Application_Start(object sender, EventArgs e) {
- log4net.Config.XmlConfigurator.Configure();
- Logging.Logger.Info("Sample starting...");
+ /// LogProvider.SetCurrentLogProvider(new ....)
+ Logging.Logger.Info("Sample starting...");
}
protected void Application_End(object sender, EventArgs e) {
Logging.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) {
diff --git a/samples/OAuthConsumer/OAuthConsumer.csproj b/samples/OAuthConsumer/OAuthConsumer.csproj
index b51b800..e64a4ac 100644
--- a/samples/OAuthConsumer/OAuthConsumer.csproj
+++ b/samples/OAuthConsumer/OAuthConsumer.csproj
@@ -49,10 +49,6 @@
<DefineConstants>$(DefineConstants);SAMPLESONLY</DefineConstants>
</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="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\src\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -157,7 +153,6 @@
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Code\Logging.cs" />
- <Compile Include="Code\TracePageAppender.cs" />
<Compile Include="GoogleAddressBook.aspx.cs">
<DependentUpon>GoogleAddressBook.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
diff --git a/samples/OAuthConsumer/packages.config b/samples/OAuthConsumer/packages.config
index c75c944..94b1173 100644
--- a/samples/OAuthConsumer/packages.config
+++ b/samples/OAuthConsumer/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.Bcl" version="1.1.3" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" />