Skip to content

NLog upgraded from 2.0 to 2.1 - #8 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 15 additions & 20 deletions LoggingExtensions.NLog.Sample/App.config
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
</configSections>
<nlog>
<targets>
<target name="console" type="Console"
layout="${message}"
/>
<target name="file" type="AsyncWrapper"
queueLimit="5000"
overflowAction="Discard">
<target type="File"
fileName="${basedir}/logs/this.Log-NLog.Sample.log"
layout="${longdate} ${threadid} [${level:uppercase=true}] ${message}"
/>
<target name="console" type="Console" layout="${message}" />
<target name="file" type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target type="File" fileName="${basedir}/logs/this.Log-NLog.Sample.log" layout="${longdate} ${threadid} [${level:uppercase=true}] ${message}" />
</target>
<target name="errorSmtp" type="Mail"
layout="${longdate} ${threadid} [${level:uppercase=true}] ${logger} - ${message}"
subject="this.Log Sample Console Errors - LOCAL DEBUG"
to="[email protected]"
from="[email protected]"
smtpServer="localhost"
/>
<target name="errorSmtp" type="Mail" layout="${longdate} ${threadid} [${level:uppercase=true}] ${logger} - ${message}" subject="this.Log Sample Console Errors - LOCAL DEBUG" to="[email protected]" from="[email protected]" smtpServer="localhost" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did anything change here or was it just nuget doing the same crap, different day in reformatting my .config files?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure It was just a XML reformat. I probably shouldn't of committed
it, sorry.
On 22 Jan 2014 02:38, "Rob Reynolds" [email protected] wrote:

In LoggingExtensions.NLog.Sample/App.config:

   </target>
  •  <target name="errorSmtp" type="Mail"
    
  •       layout="${longdate} ${threadid} [${level:uppercase=true}] ${logger} - ${message}"
    
  •       subject="this.Log Sample Console Errors - LOCAL DEBUG"
    
  •       smtpServer="localhost"
    
  •         />
    
  •  <target name="errorSmtp" type="Mail" layout="${longdate} ${threadid} [${level:uppercase=true}] ${logger} - ${message}" subject="this.Log Sample Console Errors - LOCAL DEBUG" to="[email protected]" from="[email protected]" smtpServer="localhost" />
    

Did anything change here or was it just nuget doing the same crap,
different day in reformatting my .config files?


Reply to this email directly or view it on GitHubhttps://github.com//pull/9/files#r9043174
.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, I can rip it back out.

</targets>

<rules>
Expand All @@ -32,6 +19,14 @@
</rules>
</nlog>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little disconcerting that this binding redirect was necessary though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rob, I can't comment on necessity, I basically just nugetted the 2.1 lib
and took the changes.

On 22 January 2014 07:12, Rob Reynolds [email protected] wrote:

In LoggingExtensions.NLog.Sample/App.config:

- - - - -

A little disconcerting that this binding redirect was necessary though.


Reply to this email directly or view it on GitHubhttps://github.com//pull/9/files#r9054579
.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, I'll see what's up.

</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
20 changes: 11 additions & 9 deletions LoggingExtensions.NLog.Sample/LoggingExtensions.NLog.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="this.Log, Version=0.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\this.Log.0.0.2.0\lib\net40\this.Log.dll</HintPath>
</Reference>
<Reference Include="this.Log-NLog, Version=0.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\this.Log-NLog.0.0.2.0\lib\net40\this.Log-NLog.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\SharedAssembly.cs">
Expand Down Expand Up @@ -110,6 +102,16 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LoggingExtensions.Core\LoggingExtensions.Core.csproj">
<Project>{F61EB8DD-2E99-4E3B-96F0-8015FC6FB880}</Project>
<Name>LoggingExtensions.Core</Name>
</ProjectReference>
<ProjectReference Include="..\LoggingExtensions.NLog\LoggingExtensions.NLog.csproj">
<Project>{E045C968-1B32-493F-A3C1-B428A2789F44}</Project>
<Name>LoggingExtensions.NLog</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.
Expand Down
2 changes: 1 addition & 1 deletion LoggingExtensions.NLog.Sample/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="2.0.0.2000" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="this.Log" version="0.0.2.0" targetFramework="net40" />
<package id="this.Log-NLog" version="0.0.2.0" targetFramework="net40" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
<Reference Include="NLog, Version=2.1.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down
35 changes: 15 additions & 20 deletions LoggingExtensions.NLog.VB.Sample/app.config
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
</configSections>
<nlog>
<targets>
<target name="console" type="Console"
layout="${message}"
/>
<target name="file" type="AsyncWrapper"
queueLimit="5000"
overflowAction="Discard">
<target type="File"
fileName="${basedir}/logs/this.Log-NLog.Sample.log"
layout="${longdate} ${threadid} [${level:uppercase=true}] ${message}"
/>
<target name="console" type="Console" layout="${message}" />
<target name="file" type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target type="File" fileName="${basedir}/logs/this.Log-NLog.Sample.log" layout="${longdate} ${threadid} [${level:uppercase=true}] ${message}" />
</target>
<target name="errorSmtp" type="Mail"
layout="${longdate} ${threadid} [${level:uppercase=true}] ${logger} - ${message}"
subject="this.Log Sample Console Errors - LOCAL DEBUG"
to="[email protected]"
from="[email protected]"
smtpServer="localhost"
/>
<target name="errorSmtp" type="Mail" layout="${longdate} ${threadid} [${level:uppercase=true}] ${logger} - ${message}" subject="this.Log Sample Console Errors - LOCAL DEBUG" to="[email protected]" from="[email protected]" smtpServer="localhost" />
</targets>

<rules>
Expand All @@ -32,6 +19,14 @@
</rules>
</nlog>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
2 changes: 1 addition & 1 deletion LoggingExtensions.NLog.VB.Sample/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="2.0.0.2000" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="this.Log" version="0.0.2.0" targetFramework="net40" />
<package id="this.Log-NLog" version="0.0.2.0" targetFramework="net40" />
</packages>
5 changes: 3 additions & 2 deletions LoggingExtensions.NLog/LoggingExtensions.NLog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
<AssemblyOriginatorKeyFile>..\LoggingExtensions.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
<Reference Include="NLog, Version=2.1.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion LoggingExtensions.NLog/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="2.0.0.2000" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
</packages>
5 changes: 3 additions & 2 deletions LoggingExtensions.Tests/LoggingExtensions.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
<Reference Include="NLog, Version=2.1.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion LoggingExtensions.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="log4net" version="1.2.10" targetFramework="net40" allowedVersions="[1.2.10]" />
<package id="Moq" version="4.0.10827" targetFramework="net40" />
<package id="NLog" version="2.0.0.2000" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="NUnit" version="2.5.10.11092" targetFramework="net40" />
<package id="Should" version="1.1.12.0" targetFramework="net40" />
<package id="TinySpec.NUnit" version="0.9.5" targetFramework="net40" />
Expand Down
3 changes: 3 additions & 0 deletions LoggingExtensions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NLog", "NLog", "{83D83031-665E-432D-8A5D-C8A11218C380}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggingExtensions.NLog.Sample", "LoggingExtensions.NLog.Sample\LoggingExtensions.NLog.Sample.csproj", "{431975AF-1775-4999-A733-D9B206BEFBB9}"
ProjectSection(ProjectDependencies) = postProject
{E045C968-1B32-493F-A3C1-B428A2789F44} = {E045C968-1B32-493F-A3C1-B428A2789F44}
EndProjectSection
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "LoggingExtensions.NLog.VB.Sample", "LoggingExtensions.NLog.VB.Sample\LoggingExtensions.NLog.VB.Sample.vbproj", "{CEC058B6-EEEF-4C60-A1A3-C607A7B5B3EB}"
EndProject
Expand Down