Skip to content

Commit

Permalink
Merge pull request #3 from snakefoot/master
Browse files Browse the repository at this point in the history
Removed System.Web.Mvc dependency and included userCustomData
  • Loading branch information
QuantumNightmare authored Apr 3, 2018
2 parents 074cae9 + 84ce680 commit 387089e
Show file tree
Hide file tree
Showing 10 changed files with 220 additions and 211 deletions.
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ You need to configure NLog.config.
* IgnoreCookieNames - cookies you wish to ignore, eg user tokens
* IgnoreServerVariableNames - Server vars you wish to ignore, eg sessions
* IgnoreHeaderNames - HTTP header to ignore, eg API keys
* UseIdentityNameAsUserId - If you're using a web project, send user name from HttpContext.Current.User.Identity.Name? Used for User Tracking
* IsRawDataIgnored - RawData from web requests is ignored
* UserIdentityInfo - Explicitly defines lookup of user identity for Raygun events.
* UseExecutingAssemblyVersion - Attempt to get the executing assembly version, or root ASP.Net assembly version for Raygun events.
* ApplicationVersion - Explicitly defines an application version for Raygun events. This will be ignored if UseExecutingAssemblyVersion is set to true and returns a value.

Expand All @@ -36,23 +37,21 @@ Your `NLog.config` should look something like this:
<add assembly="NLog.Raygun"/>
</extensions>
<targets>
<!-- Set up the target -->
<target name="asyncRaygun" xsi:type="AsyncWrapper">
<target
name="RayGunTarget"
type="RayGun"
ApiKey=""
Tags=""
IgnoreFormFieldNames=""
IgnoreCookieNames=""
IgnoreServerVariableNames=""
IgnoreHeaderNames=""
UseIdentityNameAsUserId="true"
UseExecutingAssemblyVersion="false"
ApplicationVersion=""
layout="${uppercase:${level}} ${message} ${exception:format=ToString,StackTrace}${newline}"
<!-- Set up the target (Avoid using async=true or AsyncWrapper) -->
<target
name="RayGunTarget"
type="RayGun"
ApiKey=""
Tags=""
IgnoreFormFieldNames=""
IgnoreCookieNames=""
IgnoreServerVariableNames=""
IgnoreHeaderNames=""
UserIdentityInfo=""
UseExecutingAssemblyVersion="false"
ApplicationVersion=""
layout="${uppercase:${level}} ${message} ${exception:format=ToString,StackTrace}${newline}"
/>
</target>
</targets>
<rules>
<!-- Set up the logger. -->
Expand Down
33 changes: 14 additions & 19 deletions src/NLog.Raygun.TestApp/NLog.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,22 @@
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<extensions>
<add assembly="NLog.Raygun"/>
</extensions>
<targets>
<!-- add your targets here -->
<target name="asyncRaygun" xsi:type="AsyncWrapper">
<target
name="RayGunTarget"
type="RayGun"
ApiKey=""
Tags=""
IgnoreFormFieldNames=""
IgnoreCookieNames=""
IgnoreServerVariableNames=""
IgnoreHeaderNames=""
UseIdentityNameAsUserId="false"
UseExecutingAssemblyVersion="false"
ApplicationVersion=""
layout="${uppercase:${level}} ${message} ${exception:format=ToString,StackTrace}${newline}"
/>
</target>
<target
name="RayGunTarget"
type="RayGun"
ApiKey=""
Tags=""
IgnoreFormFieldNames=""
IgnoreCookieNames=""
IgnoreServerVariableNames=""
IgnoreHeaderNames=""
UseExecutingAssemblyVersion="false"
ApplicationVersion="${assembly-version:NLog.Raygun.TestApp}"
UserIdentityInfo="${windows-identity}"
layout="${uppercase:${level}} ${message} ${exception:format=ToString,StackTrace}${newline}"
/>
</targets>
<rules>
<!-- add your logging rules here -->
Expand Down
4 changes: 2 additions & 2 deletions src/NLog.Raygun.TestApp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("NLog.Raygun.TestApp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Hewlett-Packard Company")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NLog.Raygun.TestApp")]
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard Company 2014")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
8 changes: 0 additions & 8 deletions src/NLog.Raygun.TestApp/app.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
29 changes: 13 additions & 16 deletions src/NLog.Raygun.WebTestApp/NLog.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,19 @@
</extensions>

<targets>
<target name="asyncRaygun" xsi:type="AsyncWrapper">
<target
name="RayGunTarget"
type="RayGun"
ApiKey=""
Tags=""
IgnoreFormFieldNames=""
IgnoreCookieNames=""
IgnoreServerVariableNames=""
IgnoreHeaderNames=""
UseIdentityNameAsUserId="false"
UseExecutingAssemblyVersion="false"
ApplicationVersion=""
layout="${uppercase:${level}} ${message} ${exception:format=ToString,StackTrace}${newline}"
/>
</target>
<target
name="RayGunTarget"
type="RayGun"
ApiKey=""
Tags=""
IgnoreFormFieldNames=""
IgnoreCookieNames=""
IgnoreServerVariableNames=""
IgnoreHeaderNames=""
UseExecutingAssemblyVersion="false"
ApplicationVersion=""
layout="${uppercase:${level}} ${message} ${exception:format=ToString,StackTrace}${newline}"
/>
</targets>
<rules>
<logger name="*" minlevel="Error" writeTo="RayGunTarget" />
Expand Down
48 changes: 8 additions & 40 deletions src/NLog.Raygun/NLog.Raygun.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,56 +39,24 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Mindscape.Raygun4Net.5.0.1\lib\net40\Mindscape.Raygun4Net.dll</HintPath>
</Reference>
<Reference Include="Mindscape.Raygun4Net4">
<Reference Include="Mindscape.Raygun4Net4, Version=5.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Mindscape.Raygun4Net.5.0.1\lib\net40\Mindscape.Raygun4Net4.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=3.2.1.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NLog.3.2.1\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RaygunException.cs" />
<Compile Include="RayGunTarget.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand All @@ -99,11 +67,11 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
4 changes: 2 additions & 2 deletions src/NLog.Raygun/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("NLog.Raygun")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Hewlett-Packard Company")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NLog.Raygun")]
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard Company 2014")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
Loading

0 comments on commit 387089e

Please sign in to comment.