diff options
Diffstat (limited to 'samples/OAuthClient')
-rw-r--r-- | samples/OAuthClient/Code/Logging.cs | 6 | ||||
-rw-r--r-- | samples/OAuthClient/Code/TracePageAppender.cs | 13 | ||||
-rw-r--r-- | samples/OAuthClient/Global.asax.cs | 9 | ||||
-rw-r--r-- | samples/OAuthClient/OAuthClient.csproj | 5 | ||||
-rw-r--r-- | samples/OAuthClient/packages.config | 1 |
5 files changed, 8 insertions, 26 deletions
diff --git a/samples/OAuthClient/Code/Logging.cs b/samples/OAuthClient/Code/Logging.cs index 4e47e49..8fbf594 100644 --- a/samples/OAuthClient/Code/Logging.cs +++ b/samples/OAuthClient/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.OAuthClient"); + public static ILog Logger = LogProvider.GetLogger("DotNetOpenAuth.OAuthClient"); } }
\ No newline at end of file diff --git a/samples/OAuthClient/Code/TracePageAppender.cs b/samples/OAuthClient/Code/TracePageAppender.cs deleted file mode 100644 index f41fd17..0000000 --- a/samples/OAuthClient/Code/TracePageAppender.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace OAuthClient { - 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/OAuthClient/Global.asax.cs b/samples/OAuthClient/Global.asax.cs index 77d397e..0553cbc 100644 --- a/samples/OAuthClient/Global.asax.cs +++ b/samples/OAuthClient/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..."); } 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/OAuthClient/OAuthClient.csproj b/samples/OAuthClient/OAuthClient.csproj index 83ff611..bb56aed 100644 --- a/samples/OAuthClient/OAuthClient.csproj +++ b/samples/OAuthClient/OAuthClient.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="System" /> <Reference Include="System.Data" /> <Reference Include="System.Data.DataSetExtensions" /> @@ -155,7 +151,6 @@ <Compile Include="TracePage.aspx.designer.cs"> <DependentUpon>TracePage.aspx</DependentUpon> </Compile> - <Compile Include="Code\TracePageAppender.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="WindowsLive.aspx.cs"> <DependentUpon>WindowsLive.aspx</DependentUpon> diff --git a/samples/OAuthClient/packages.config b/samples/OAuthClient/packages.config index ea83ad2..c6cfe98 100644 --- a/samples/OAuthClient/packages.config +++ b/samples/OAuthClient/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" /> |