Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Commit 290590c

Browse files
author
Vadim Hatsura
committed
Extract formatters to separate project
1 parent e03cb1e commit 290590c

13 files changed

+114
-7
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,7 @@ FakesAssemblies/
189189

190190
project.lock.json
191191
.vs
192+
193+
# JetBrains Rider
194+
.idea/
195+
*.sln.iml

serilog-sinks-elasticsearch.sln

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Microsoft Visual Studio Solution File, Format Version 12.00
1+
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 15
33
VisualStudioVersion = 15.0.26730.3
44
MinimumVisualStudioVersion = 10.0.40219.1
@@ -21,6 +21,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.Elasticsearch
2121
EndProject
2222
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Elasticsearch.Sample", "sample\Serilog.Sinks.Elasticsearch.Sample\Serilog.Sinks.Elasticsearch.Sample.csproj", "{253B37AB-D82E-4A5F-BA16-F1BE398818C8}"
2323
EndProject
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Formatting.Elasticsearch", "src\Serilog.Formatting.Elasticsearch\Serilog.Formatting.Elasticsearch.csproj", "{0E6D34BF-322A-4803-94D1-355F6D5024BE}"
25+
EndProject
2426
Global
2527
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2628
Debug|Any CPU = Debug|Any CPU
@@ -39,6 +41,10 @@ Global
3941
{253B37AB-D82E-4A5F-BA16-F1BE398818C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
4042
{253B37AB-D82E-4A5F-BA16-F1BE398818C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
4143
{253B37AB-D82E-4A5F-BA16-F1BE398818C8}.Release|Any CPU.Build.0 = Release|Any CPU
44+
{0E6D34BF-322A-4803-94D1-355F6D5024BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45+
{0E6D34BF-322A-4803-94D1-355F6D5024BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
46+
{0E6D34BF-322A-4803-94D1-355F6D5024BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
47+
{0E6D34BF-322A-4803-94D1-355F6D5024BE}.Release|Any CPU.Build.0 = Release|Any CPU
4248
EndGlobalSection
4349
GlobalSection(SolutionProperties) = preSolution
4450
HideSolutionNode = FALSE
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013-2016 Serilog Contributors
1+
// Copyright 2013-2016 Serilog Contributors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323
using Serilog.Formatting.Json;
2424
using Serilog.Parsing;
2525

26-
namespace Serilog.Sinks.Elasticsearch
26+
namespace Serilog.Formatting.Elasticsearch
2727
{
2828
/// <summary>
2929
/// Formats log events in a simple JSON structure. Instances of this class
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 Serilog Contributors
1+
// Copyright 2014 Serilog Contributors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323
using Serilog.Events;
2424
using Serilog.Parsing;
2525

26-
namespace Serilog.Sinks.Elasticsearch
26+
namespace Serilog.Formatting.Elasticsearch
2727
{
2828
/// <summary>
2929
/// Custom Json formatter that respects the configured property name handling and forces 'Timestamp' to @timestamp
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2016 Serilog Contributors
1+
// Copyright 2016 Serilog Contributors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
1717
using System.IO;
1818
using Elasticsearch.Net;
1919

20-
namespace Serilog.Sinks.Elasticsearch
20+
namespace Serilog.Formatting.Elasticsearch
2121
{
2222
/// <summary>
2323
/// A JSON formatter which plays nice with Kibana,
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>Serilog.Formatting.Elasticsearch</id>
5+
<version>$version$</version>
6+
<authors>Michiel van Oudheusden, Martijn Laarman, Mogens Heller Grabe</authors>
7+
<description>The perfect way for .NET apps formatting structured log events to Elasticsearch JSON.</description>
8+
<language>en-US</language>
9+
<projectUrl>http://serilog.net</projectUrl>
10+
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
11+
<iconUrl>http://serilog.net/images/serilog-sink-nuget.png</iconUrl>
12+
<tags>serilog logging elasticsearch</tags>
13+
<dependencies>
14+
<dependency id="Serilog" version="2.6.0" />
15+
<dependency id="Elasticsearch.Net" version="6.0.0" />
16+
</dependencies>
17+
</metadata>
18+
<files>
19+
<file src="bin\Release\Serilog.Sinks.Elasticsearch.dll" target="lib\net45" />
20+
<file src="bin\Release\Serilog.Sinks.Elasticsearch.pdb" target="lib\net45" />
21+
<file src="**\*.cs" target="src" />
22+
</files>
23+
</package>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>Serilog.Formatting.Elasticsearch</id>
5+
<version>$version$</version>
6+
<authors>Michiel van Oudheusden, Martijn Laarman, Mogens Heller Grabe, Konstantin Erman</authors>
7+
<description>The perfect way for .NET apps formatting structured log events to Elasticsearch JSON.</description>
8+
<language>en-US</language>
9+
<projectUrl>http://serilog.net</projectUrl>
10+
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
11+
<iconUrl>http://serilog.net/images/serilog-sink-nuget.png</iconUrl>
12+
<repository type="git" url="https://github.com/serilog/serilog-sinks-elasticsearch" />
13+
<tags>serilog logging elasticsearch</tags>
14+
<dependencies>
15+
<dependency id="Serilog" version="2.6.0" />
16+
<dependency id="Elasticsearch.Net" version="6.0.0" />
17+
</dependencies>
18+
</metadata>
19+
<files>
20+
</files>
21+
</package>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<VersionPrefix>6.0.0</VersionPrefix>
5+
<VersionSuffix>alpha</VersionSuffix>
6+
<Authors>Michiel van Oudheusden, Martijn Laarman, Mogens Heller Grabe, Serilog Contributors</Authors>
7+
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
8+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10+
<AssemblyName>Serilog.Formatting.Elasticsearch</AssemblyName>
11+
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
12+
<SignAssembly>true</SignAssembly>
13+
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
14+
<PackageId>Serilog.Formatting.Elasticsearch</PackageId>
15+
<PackageTags>serilog;elasticsearch;logging;event;formatting</PackageTags>
16+
<PackageReleaseNotes>https://github.com/serilog/serilog-sinks-elasticsearch/blob/master/CHANGES.md</PackageReleaseNotes>
17+
<PackageIconUrl>http://serilog.net/images/serilog-sink-nuget.png</PackageIconUrl>
18+
<PackageProjectUrl>https://github.com/serilog/serilog-sinks-elasticsearch</PackageProjectUrl>
19+
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
20+
<RepositoryUrl>https://github.com/serilog/serilog-sinks-elasticsearch</RepositoryUrl>
21+
<RepositoryType>git</RepositoryType>
22+
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.3' ">1.6.0</NetStandardImplicitPackageVersion>
23+
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
24+
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
25+
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
26+
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
27+
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
28+
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
29+
<RootNamespace>Serilog.Formatting.ElasticSearch</RootNamespace>
30+
</PropertyGroup>
31+
32+
<ItemGroup>
33+
<PackageReference Include="Elasticsearch.Net" Version="6.0.0" />
34+
<PackageReference Include="Serilog" Version="2.6.0" />
35+
</ItemGroup>
36+
37+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
38+
<DefineConstants>$(DefineConstants);DOTNETCORE;NO_SERIALIZATION</DefineConstants>
39+
</PropertyGroup>
40+
41+
<ItemGroup>
42+
<DotNetCliToolReference Include="dotnet-version" Version="1.1.0" />
43+
</ItemGroup>
44+
45+
</Project>

src/Serilog.Sinks.Elasticsearch/Serilog.Sinks.Elasticsearch.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,8 @@
4949
<DotNetCliToolReference Include="dotnet-version" Version="1.1.0" />
5050
</ItemGroup>
5151

52+
<ItemGroup>
53+
<ProjectReference Include="..\Serilog.Formatting.Elasticsearch\Serilog.Formatting.Elasticsearch.csproj" />
54+
</ItemGroup>
55+
5256
</Project>

src/Serilog.Sinks.Elasticsearch/Sinks/ElasticSearch/ElasticsearchSinkState.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
using Serilog.Debugging;
2121
using Serilog.Events;
2222
using Serilog.Formatting;
23+
using Serilog.Formatting.ElasticSearch;
2324

2425
namespace Serilog.Sinks.Elasticsearch
2526
{

0 commit comments

Comments
 (0)