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

Commit

Permalink
Extract formatters to separate project
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Hatsura committed Jan 22, 2019
1 parent e03cb1e commit 290590c
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,7 @@ FakesAssemblies/

project.lock.json
.vs

# JetBrains Rider
.idea/
*.sln.iml
8 changes: 7 additions & 1 deletion serilog-sinks-elasticsearch.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.3
MinimumVisualStudioVersion = 10.0.40219.1
Expand All @@ -21,6 +21,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.Elasticsearch
EndProject
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}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Formatting.Elasticsearch", "src\Serilog.Formatting.Elasticsearch\Serilog.Formatting.Elasticsearch.csproj", "{0E6D34BF-322A-4803-94D1-355F6D5024BE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -39,6 +41,10 @@ Global
{253B37AB-D82E-4A5F-BA16-F1BE398818C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{253B37AB-D82E-4A5F-BA16-F1BE398818C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{253B37AB-D82E-4A5F-BA16-F1BE398818C8}.Release|Any CPU.Build.0 = Release|Any CPU
{0E6D34BF-322A-4803-94D1-355F6D5024BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E6D34BF-322A-4803-94D1-355F6D5024BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E6D34BF-322A-4803-94D1-355F6D5024BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E6D34BF-322A-4803-94D1-355F6D5024BE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2013-2016 Serilog Contributors
// Copyright 2013-2016 Serilog Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@
using Serilog.Formatting.Json;
using Serilog.Parsing;

namespace Serilog.Sinks.Elasticsearch
namespace Serilog.Formatting.Elasticsearch
{
/// <summary>
/// Formats log events in a simple JSON structure. Instances of this class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2014 Serilog Contributors
// Copyright 2014 Serilog Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@
using Serilog.Events;
using Serilog.Parsing;

namespace Serilog.Sinks.Elasticsearch
namespace Serilog.Formatting.Elasticsearch
{
/// <summary>
/// Custom Json formatter that respects the configured property name handling and forces 'Timestamp' to @timestamp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Serilog Contributors
// Copyright 2016 Serilog Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@
using System.IO;
using Elasticsearch.Net;

namespace Serilog.Sinks.Elasticsearch
namespace Serilog.Formatting.Elasticsearch
{
/// <summary>
/// A JSON formatter which plays nice with Kibana,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Serilog.Formatting.Elasticsearch</id>
<version>$version$</version>
<authors>Michiel van Oudheusden, Martijn Laarman, Mogens Heller Grabe</authors>
<description>The perfect way for .NET apps formatting structured log events to Elasticsearch JSON.</description>
<language>en-US</language>
<projectUrl>http://serilog.net</projectUrl>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<iconUrl>http://serilog.net/images/serilog-sink-nuget.png</iconUrl>
<tags>serilog logging elasticsearch</tags>
<dependencies>
<dependency id="Serilog" version="2.6.0" />
<dependency id="Elasticsearch.Net" version="6.0.0" />
</dependencies>
</metadata>
<files>
<file src="bin\Release\Serilog.Sinks.Elasticsearch.dll" target="lib\net45" />
<file src="bin\Release\Serilog.Sinks.Elasticsearch.pdb" target="lib\net45" />
<file src="**\*.cs" target="src" />
</files>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Serilog.Formatting.Elasticsearch</id>
<version>$version$</version>
<authors>Michiel van Oudheusden, Martijn Laarman, Mogens Heller Grabe, Konstantin Erman</authors>
<description>The perfect way for .NET apps formatting structured log events to Elasticsearch JSON.</description>
<language>en-US</language>
<projectUrl>http://serilog.net</projectUrl>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<iconUrl>http://serilog.net/images/serilog-sink-nuget.png</iconUrl>
<repository type="git" url="https://github.com/serilog/serilog-sinks-elasticsearch" />
<tags>serilog logging elasticsearch</tags>
<dependencies>
<dependency id="Serilog" version="2.6.0" />
<dependency id="Elasticsearch.Net" version="6.0.0" />
</dependencies>
</metadata>
<files>
</files>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>6.0.0</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
<Authors>Michiel van Oudheusden, Martijn Laarman, Mogens Heller Grabe, Serilog Contributors</Authors>
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Serilog.Formatting.Elasticsearch</AssemblyName>
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>Serilog.Formatting.Elasticsearch</PackageId>
<PackageTags>serilog;elasticsearch;logging;event;formatting</PackageTags>
<PackageReleaseNotes>https://github.com/serilog/serilog-sinks-elasticsearch/blob/master/CHANGES.md</PackageReleaseNotes>
<PackageIconUrl>http://serilog.net/images/serilog-sink-nuget.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/serilog/serilog-sinks-elasticsearch</PackageProjectUrl>
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<RepositoryUrl>https://github.com/serilog/serilog-sinks-elasticsearch</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.3' ">1.6.0</NetStandardImplicitPackageVersion>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<RootNamespace>Serilog.Formatting.ElasticSearch</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Elasticsearch.Net" Version="6.0.0" />
<PackageReference Include="Serilog" Version="2.6.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<DefineConstants>$(DefineConstants);DOTNETCORE;NO_SERIALIZATION</DefineConstants>
</PropertyGroup>

<ItemGroup>
<DotNetCliToolReference Include="dotnet-version" Version="1.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,8 @@
<DotNetCliToolReference Include="dotnet-version" Version="1.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Serilog.Formatting.Elasticsearch\Serilog.Formatting.Elasticsearch.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Serilog.Debugging;
using Serilog.Events;
using Serilog.Formatting;
using Serilog.Formatting.ElasticSearch;

namespace Serilog.Sinks.Elasticsearch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.IO;
using System.Linq;
using System.Text;
using Serilog.Formatting.ElasticSearch;
using Xunit;

namespace Serilog.Sinks.Elasticsearch.Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Newtonsoft.Json.Converters;
using Xunit;
using Serilog.Events;
using Serilog.Formatting.ElasticSearch;
using Serilog.Parsing;
using Serilog.Sinks.Elasticsearch.Tests.Domain;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Serilog.Formatting.Elasticsearch\Serilog.Formatting.Elasticsearch.csproj" />
<ProjectReference Include="..\..\src\Serilog.Sinks.Elasticsearch\Serilog.Sinks.Elasticsearch.csproj" />
</ItemGroup>

Expand Down

0 comments on commit 290590c

Please sign in to comment.