Skip to content

Commit 4aa8924

Browse files
authored
Merge pull request #3 from CorrelatorSharp/feature-net-standard
Netstandard
2 parents 6a5658c + 9ad9050 commit 4aa8924

15 files changed

+106
-338
lines changed
Lines changed: 15 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,21 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{7111FE2C-30FA-4DC4-B14F-9F8597FC0FBC}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>CorrelatorSharp.Logging.Tests</RootNamespace>
11-
<AssemblyName>CorrelatorSharp.Logging.Tests</AssemblyName>
12-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
4+
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
5+
<IsPackable>false</IsPackable>
156
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType>pdbonly</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
30-
<ErrorReport>prompt</ErrorReport>
31-
<WarningLevel>4</WarningLevel>
32-
</PropertyGroup>
33-
<ItemGroup>
34-
<Reference Include="Machine.Specifications, Version=0.9.3.0, Culture=neutral, processorArchitecture=MSIL">
35-
<HintPath>..\packages\Machine.Specifications.0.9.3\lib\net45\Machine.Specifications.dll</HintPath>
36-
<Private>True</Private>
37-
</Reference>
38-
<Reference Include="Machine.Specifications.Clr4, Version=0.9.3.0, Culture=neutral, processorArchitecture=MSIL">
39-
<HintPath>..\packages\Machine.Specifications.0.9.3\lib\net45\Machine.Specifications.Clr4.dll</HintPath>
40-
<Private>True</Private>
41-
</Reference>
42-
<Reference Include="Machine.Specifications.Should, Version=0.8.0.0, Culture=neutral, processorArchitecture=MSIL">
43-
<HintPath>..\packages\Machine.Specifications.Should.0.8.0\lib\net45\Machine.Specifications.Should.dll</HintPath>
44-
<Private>True</Private>
45-
</Reference>
46-
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
47-
<Reference Include="System" />
48-
<Reference Include="System.Core" />
49-
<Reference Include="System.Xml.Linq" />
50-
<Reference Include="System.Data.DataSetExtensions" />
51-
<Reference Include="Microsoft.CSharp" />
52-
<Reference Include="System.Data" />
53-
<Reference Include="System.Net.Http" />
54-
<Reference Include="System.Xml" />
55-
</ItemGroup>
56-
<ItemGroup>
57-
<Compile Include="ConfigurationSpecs.cs" />
58-
<Compile Include="Properties\AssemblyInfo.cs" />
59-
<Compile Include="LogManagerSpecs.cs" />
60-
</ItemGroup>
7+
618
<ItemGroup>
62-
<ProjectReference Include="..\CorrelatorSharp.Logging\CorrelatorSharp.Logging.csproj">
63-
<Project>{e9b4f62a-e338-41c2-89e0-2fd70eb5c5f9}</Project>
64-
<Name>CorrelatorSharp.Logging</Name>
65-
</ProjectReference>
9+
<PackageReference Include="Machine.Specifications.Runner.VisualStudio" Version="2.*" />
10+
<PackageReference Include="Machine.Specifications.Should" Version="0.*" />
11+
<PackageReference Include="Machine.Specifications" Version="0.*" />
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.*" />
13+
<PackageReference Include="System.Collections.Immutable" Version="1.4.0" />
14+
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
6615
</ItemGroup>
16+
6717
<ItemGroup>
68-
<None Include="packages.config" />
18+
<ProjectReference Include="..\CorrelatorSharp.Logging\CorrelatorSharp.Logging.csproj" />
6919
</ItemGroup>
70-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
71-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
72-
Other similar extension points exist, see Microsoft.Common.targets.
73-
<Target Name="BeforeBuild">
74-
</Target>
75-
<Target Name="AfterBuild">
76-
</Target>
77-
-->
78-
</Project>
20+
21+
</Project>

CorrelatorSharp.Logging.Tests/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 37 deletions
This file was deleted.

CorrelatorSharp.Logging.Tests/packages.config

Lines changed: 0 additions & 5 deletions
This file was deleted.

CorrelatorSharp.Logging.sln

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,36 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.24720.0
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27130.2027
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorrelatorSharp.Logging", "CorrelatorSharp.Logging\CorrelatorSharp.Logging.csproj", "{E9B4F62A-E338-41C2-89E0-2FD70EB5C5F9}"
7-
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorrelatorSharp.Logging.Tests", "CorrelatorSharp.Logging.Tests\CorrelatorSharp.Logging.Tests.csproj", "{7111FE2C-30FA-4DC4-B14F-9F8597FC0FBC}"
9-
EndProject
106
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D4E55B7B-C40E-4BFE-B43E-8155A5F1DE92}"
117
ProjectSection(SolutionItems) = preProject
128
appveyor.yml = appveyor.yml
139
EndProjectSection
1410
EndProject
11+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorrelatorSharp.Logging", "CorrelatorSharp.Logging\CorrelatorSharp.Logging.csproj", "{D55E9631-2D79-4E4D-BB67-13FBA8E81653}"
12+
EndProject
13+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorrelatorSharp.Logging.Tests", "CorrelatorSharp.Logging.Tests\CorrelatorSharp.Logging.Tests.csproj", "{1EA7056D-C2B6-4524-A3C3-9A6EF4237505}"
14+
EndProject
1515
Global
1616
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1717
Debug|Any CPU = Debug|Any CPU
1818
Release|Any CPU = Release|Any CPU
1919
EndGlobalSection
2020
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21-
{E9B4F62A-E338-41C2-89E0-2FD70EB5C5F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22-
{E9B4F62A-E338-41C2-89E0-2FD70EB5C5F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
23-
{E9B4F62A-E338-41C2-89E0-2FD70EB5C5F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
24-
{E9B4F62A-E338-41C2-89E0-2FD70EB5C5F9}.Release|Any CPU.Build.0 = Release|Any CPU
25-
{7111FE2C-30FA-4DC4-B14F-9F8597FC0FBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26-
{7111FE2C-30FA-4DC4-B14F-9F8597FC0FBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
27-
{7111FE2C-30FA-4DC4-B14F-9F8597FC0FBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
28-
{7111FE2C-30FA-4DC4-B14F-9F8597FC0FBC}.Release|Any CPU.Build.0 = Release|Any CPU
21+
{D55E9631-2D79-4E4D-BB67-13FBA8E81653}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{D55E9631-2D79-4E4D-BB67-13FBA8E81653}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{D55E9631-2D79-4E4D-BB67-13FBA8E81653}.Release|Any CPU.ActiveCfg = Release|Any CPU
24+
{D55E9631-2D79-4E4D-BB67-13FBA8E81653}.Release|Any CPU.Build.0 = Release|Any CPU
25+
{1EA7056D-C2B6-4524-A3C3-9A6EF4237505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26+
{1EA7056D-C2B6-4524-A3C3-9A6EF4237505}.Debug|Any CPU.Build.0 = Debug|Any CPU
27+
{1EA7056D-C2B6-4524-A3C3-9A6EF4237505}.Release|Any CPU.ActiveCfg = Release|Any CPU
28+
{1EA7056D-C2B6-4524-A3C3-9A6EF4237505}.Release|Any CPU.Build.0 = Release|Any CPU
2929
EndGlobalSection
3030
GlobalSection(SolutionProperties) = preSolution
3131
HideSolutionNode = FALSE
3232
EndGlobalSection
33+
GlobalSection(ExtensibilityGlobals) = postSolution
34+
SolutionGuid = {F8EB6AD3-5A12-4996-9526-B01D00029BCA}
35+
EndGlobalSection
3336
EndGlobal
Lines changed: 17 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,20 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{E9B4F62A-E338-41C2-89E0-2FD70EB5C5F9}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>CorrelatorSharp.Logging</RootNamespace>
3+
<PackageId>CorrelatorSharp.Logging</PackageId>
4+
5+
<Version>1.3.0</Version>
6+
7+
<!--Bump the assembly version only on major releases-->
8+
<AssemblyVersion>1.1.0.0</AssemblyVersion>
9+
1110
<AssemblyName>CorrelatorSharp.Logging</AssemblyName>
12-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
11+
<Description>CorrelatorSharp, a set of tools for adding correlation identifiers for actions performed by users and machine across your applications. Your one stop shop for context-aware logging and diagnostics.</Description>
12+
<Authors>Ivan Zlatev, Jason Dryhurst-Smith</Authors>
13+
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
14+
<PackageTags>context;correlation;logging;diagnostics</PackageTags>
15+
<PackageProjectUrl>https://github.com/CorrelatorSharp/CorrelatorSharp</PackageProjectUrl>
16+
<PackageLicenseUrl>https://github.com/CorrelatorSharp/CorrelatorSharp/blob/master/LICENSE.txt</PackageLicenseUrl>
17+
1518
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType>pdbonly</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
30-
<ErrorReport>prompt</ErrorReport>
31-
<WarningLevel>4</WarningLevel>
32-
</PropertyGroup>
33-
<ItemGroup>
34-
<Reference Include="System" />
35-
<Reference Include="System.Core" />
36-
<Reference Include="Microsoft.CSharp" />
37-
</ItemGroup>
38-
<ItemGroup>
39-
<Compile Include="LoggingConfiguration.cs" />
40-
<Compile Include="LoggingConfigurationExtensions.cs" />
41-
<Compile Include="Dummy\DummyLoggerAdaptor.cs" />
42-
<Compile Include="Dummy\DummyLogManagerAdaptor.cs" />
43-
<Compile Include="ILogger.cs" />
44-
<Compile Include="ILogManagerAdaptor.cs" />
45-
<Compile Include="LogManager.cs" />
46-
<Compile Include="Properties\AssemblyInfo.cs" />
47-
</ItemGroup>
48-
<ItemGroup>
49-
<None Include="CorrelatorSharp.Logging.nuspec" />
50-
</ItemGroup>
51-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
52-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
53-
Other similar extension points exist, see Microsoft.Common.targets.
54-
<Target Name="BeforeBuild">
55-
</Target>
56-
<Target Name="AfterBuild">
57-
</Target>
58-
-->
59-
</Project>
19+
20+
</Project>

CorrelatorSharp.Logging/CorrelatorSharp.Logging.nuspec

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
using System;
2-
using System.Linq;
3-
4-
namespace CorrelatorSharp.Logging.Dummy
1+
namespace CorrelatorSharp.Logging.Dummy
52
{
63
internal class DummyLogManagerAdaptor : ILogManagerAdaptor
74
{
85
public readonly static DummyLogManagerAdaptor Instance = new DummyLogManagerAdaptor();
96

10-
public ILogger GetLogger(string name)
11-
{
12-
return new DummyLoggerAdaptor(name);
13-
}
7+
public ILogger GetLogger(string name) =>
8+
new DummyLoggerAdaptor(name);
149
}
1510
}

CorrelatorSharp.Logging/Dummy/DummyLoggerAdaptor.cs

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,17 @@ internal class DummyLoggerAdaptor : ILogger
66
{
77
public DummyLoggerAdaptor(string name)
88
{
9-
if (name == null)
10-
throw new ArgumentNullException(nameof(name));
11-
12-
Name = name;
13-
}
14-
15-
public string Name {
16-
get; private set;
9+
Name = name ?? throw new ArgumentNullException(nameof(name),"Log adaptor must have name.");
1710
}
1811

19-
public bool IsTraceEnabled {
20-
get { return true; }
21-
}
12+
public string Name { get; private set; }
2213

23-
public bool IsWarnEnabled {
24-
get { return true; }
25-
}
26-
27-
public bool IsInfoEnabled {
28-
get { return true; }
29-
}
30-
31-
public bool IsErrorEnabled {
32-
get { return true; }
33-
}
34-
35-
public bool IsFatalEnabled {
36-
get { return true; }
37-
}
38-
39-
public bool IsDebugEnabled {
40-
get { return true; }
41-
}
14+
public bool IsTraceEnabled => true;
15+
public bool IsWarnEnabled => true;
16+
public bool IsInfoEnabled => true;
17+
public bool IsErrorEnabled => true;
18+
public bool IsFatalEnabled => true;
19+
public bool IsDebugEnabled => true;
4220

4321
public void LogError(string format, params object[] values)
4422
{

CorrelatorSharp.Logging/ILogManagerAdaptor.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
using System;
2-
using System.Linq;
3-
4-
namespace CorrelatorSharp.Logging
1+
namespace CorrelatorSharp.Logging
52
{
6-
73
public interface ILogManagerAdaptor
84
{
95
ILogger GetLogger(string name);

CorrelatorSharp.Logging/ILogger.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
namespace CorrelatorSharp.Logging
44
{
5-
65
public interface ILogger
76
{
8-
97
string Name { get; }
108

119
void LogError(string format, params object[] values);
@@ -27,6 +25,5 @@ public interface ILogger
2725
bool IsErrorEnabled { get; }
2826
bool IsFatalEnabled { get; }
2927
bool IsDebugEnabled { get; }
30-
3128
}
3229
}

0 commit comments

Comments
 (0)